# Akka pub sub with routers(not via classic)

**URL:** <https://discuss.akka.io/t/akka-pub-sub-with-routers-not-via-classic/9660>\
**Category:** Akka Libraries\
**Tags:** akka, java\
**Created:** [April 3, 2022, 8:14am UTC](https://discuss.akka.io/t/akka-pub-sub-with-routers-not-via-classic/9660 "2022-04-03T08:14:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roie16](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/roie16/32/2834_2.png) [@roie16](https://discuss.akka.io/u/roie16)\
**Post date:** [April 3, 2022, 8:14am UTC](https://discuss.akka.io/t/akka-pub-sub-with-routers-not-via-classic/9660/1 "2022-04-03T08:14:32Z")

</div>

Hello,  
We want to implement akka as our pub sub solution(internal to process, not distributed), we will need to use routers, but we will also need to publish a message to several routers at once based on topic, the only thing I found is this:

> **[Classic Distributed Publish Subscribe in Cluster • Akka Documentation](https://doc.akka.io/docs/akka/current/distributed-pub-sub.html)**
>
> Akka is a toolkit for building highly concurrent, distributed, and resilient message-driven applications for Java and Scala.

but it is “classical” is it possible to implement the same mechanism in the new akka?  
second issue is that the routeels will use “round robin” this is a problem for us, I want something that is equivalent to SmallestMailboxPool in the not calssic akka (meaning the router will hold the msg until a any of the routee’s is ready) do we have a mechanism like that? or should I just implement it in “classic” way?

---

<div class="post-metadata">

**Author:** ![patriknw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/patriknw/32/89_2.png) [@patriknw](https://discuss.akka.io/u/patriknw)\
**Post date:** [April 4, 2022, 9:20am UTC](https://discuss.akka.io/t/akka-pub-sub-with-routers-not-via-classic/9660/2 "2022-04-04T09:20:23Z")

</div>

You have Pool Routers and there is a Broadcast mechanism. [Routers • Akka Documentation](https://doc.akka.io/docs/akka/current/typed/routers.html#pool-router)

However, there is no smallest mailbox strategy. If that is important an alternative could be to use the work pulling pattern described in [Reliable delivery • Akka Documentation](https://doc.akka.io/docs/akka/current/typed/reliable-delivery.html#work-pulling)  
It can be used for local only actors.
