Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Akka ask Broadcast

I have an akka 2.0 round-robin router. Now I need to broadcast a message to all routees and await the answers from all of them. I did not found a way to do so yet. First I had a list of actors that I passed to the router, but now I need to load them from my application.conf. Is there a way to await all messages of a Broadcast? It would be fine as well if I could get the number of routees from the conf flie.

like image 766
tgr Avatar asked Nov 03 '22 23:11

tgr


1 Answers

If you know the number of routees, then you would normally just count the number of answers received. However, you may want to account for a timeout, especially if your actors are running distributed because there is no guarantee that messages really get delivered.

like image 185
Christian Schlichtherle Avatar answered Nov 11 '22 08:11

Christian Schlichtherle