How can I broadcast a message to all actors that are watching a particular actor?
For context, suppose I have a AuctionActor
(which is potentially a remote actor) that is being watched by a large number of AuctionParticipantActor
types. I would like the AuctionActor
to broadcast various messages to AuctionParicipantActor
types.
One possibility would be for the AuctionActor
to keep a collection of all participant ActorRef
instances and then loop over this collection when ever a message needs to be sent to all participants. This seems inefficient and I am hoping for a better solution...