akka - why actor module not support concurrent mailbox? -
i'm fresh akka, actor,i wonder why can't find concurrent mailbox use.
result, must define dispatch actor send work actor.many times, not care data's sequence , in situation make message sequence cost time.
i find create actor router props choice:
val actorref: actorref = context.actorof(props[myactor] .withrouter(roundrobinpool(nrofinstances = 4)), name = "myactor") //or context.actorof(roundrobinpool(5).props(props[myactor]), "myactor")
it create 4 actor instance return 1 actorref -- roundrobinpool
handle , dispatch message these actors.
Comments
Post a Comment