Akka Actors send message to concrete actor

84 views Asked by At

Using Akka actors is it possible to organize actors into a ring and send messages to only two (left, right) neighbors?

1

There are 1 answers

0
Levi Ramsey On BEST ANSWER

As long as the actors have ActorRefs for their left-and-right neighbors, it's definitely possible to organize them into a ring.

Note you'd have to have a protocol for the actors to be told who their neighbors are (as all actors except the last one in the ring would have a neighbor who hadn't been spawned when that actor spawned (so setting the neighbors via Props wouldn't work)).