baudo2048
baudo2048

Reputation: 1152

Shared mailbox/recipient in Actor Model

I'm reading about Akka and Actor Model and a doubt gets in the way. I know that each Actor can have one or more recipient. My question is: can a recipient be shared among more than one Actor?

Upvotes: 0

Views: 406

Answers (1)

Franko
Franko

Reputation: 131

To paraphrase your question;

can a set of actors share a mailbox?

The most straightforward way of achieving this is by using the BalancingDispatcher as described in this section of the documentation under 'types of dispatchers'. You can specify the dispatcher you want to use for an actor wither at actor creation or in you .conf file. When used, all actors using this dispatcher use the same mailbox and should be able to process all expected messages.

Upvotes: 0

Related Questions