Typed Akka with Custom Router?

Hello there,

Is it possible to write Custom Router (https://doc.akka.io/docs/akka/current/routing.html#custom-router) for Akka Typed?

The documentation from Akka Typed provides pool or group routing only. My intent is to the same actor process any messages with a particular id.
Example: If I configure to use a pool size of say 5, then messages would be processed by message-id % 5 ways.

Please advice,
Muthu

We haven’t opened up the routing implementations for custom routing schemes, but the actual implementation of each of the routers (sans the configuration API) is very little code so it is relatively simple to write your own with inspiration from either of the typed routers:

The pool router in PoolRouterImpl.scala
The group router in GroupRouterImpl.scala

Thank you much @johanandren. I ended up writing something like the pool-router with some kind of round-robin routing. And its little code to do so.

Thanks,
Muthu