Hi Vish, There currently is no stage in Akka Stream that will allow you to dynamically add and remove listeners, we have some ideas but nothing implemented or planned yet (see ticket https://github.com/akka/akka/issues/19478). So you would have to implement your own stage for this.
The ActorPublisher needs to be one actor instance per materialization , it cannot be shared between the streams, but with websockets you will materialize a new stream for each connection, so if using that you will have to push the pubsub to the other side of it, create it upon the incoming request and have it register itself somewhere where you will do the actual publishing. You can see something like that (albeit two-ways) in this workshop I did with the Scala Usergroup here in Stockholm a while ago: https://github.com/johanandren/scala-stockholm-cluster-message-broker/tree/master/src/main/scala -- Johan Andrén Akka Team, Lightbend Inc. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
