Hi guys, I have a service that consumes messages through RabbitMq channel and should forward them to PersistentActors behind ClusterShard. The tricky part is that each persistent actor must subscribe himself for a specific messages and receive all messages from these types. For example: message1 - should be delivered -> persistenceId1, persistenceId2, persistenceId3 message2 - should be delivered -> persistenceId1, persistenceId4
I'm thinking for the following solution: 1. Implement a MessageCоordinator as cluster singleton. The Coordinator is going to contain all subscription and persist them. 2. Every persistent actor is going to register himself after initialization in the Coordinator. He's going subscribe messages with his persistentId(insted of ActorRef). 3. Each node is going to start its own "MessageRouter". The router is going to fetch recipients list from the Coordinator and subscribe for update of the list with it's ActorRef. If there is change in list the coordinator is going to notify all routers. Is my approach reasonable? Is there a better solution to this problem? Cheers, Ivan Nakov -- >>>>>>>>>> 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.
