The following scenarios can happen when using event sourcing and persistent actors:
- Cannot recover events from the journal: When creating a new persistent actor, the journal might not be available. Therefore, your actor cannot check whether it needs to recover its state. At this point, Akka persistence decides that it cannot continue, executes the onRecoveryFailure callback, and stops the actor unconditionally.
- Cannot persist events to the journal: When you have a running persistent actor, the journal might become unavailable at any given time. At this point, Akka persistence cannot persist more events and then cannot ensure that consistency will be maintained in your persistent actor. Akka persistence decides that it cannot ...