May 2017
Intermediate to advanced
414 pages
13h
English
Shutting down an actor is often achieved by sending a PoisonPill message to it. This allows the previous messages in the mailbox to get processed by the actor before it is stopped. Although this is totally correct for regular actors, it can turn into unexpected behaviors when using a persistent actor. Incoming commands are stashed while the persistent actor is awaiting confirmation from the journal that events have been stored when calling persist(). The incoming commands will be drained from the Actor's mailbox and put into its internal stash while awaiting the confirmation (thus, before calling the persist handlers). Therefore, the persistent actor may receive and (auto) handle the PoisonPill message ...
Read now
Unlock full access