Łukasz Rzeszotarski
Łukasz Rzeszotarski

Reputation: 6140

Akka Actors send message to concrete actor

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

Upvotes: 1

Views: 85

Answers (1)

Levi Ramsey
Levi Ramsey

Reputation: 20611

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)).

Upvotes: 5

Related Questions