Event sourcing stores state changes as an ordered, append-only sequence of events rather than repeatedly replacing one state value. A journal preserves the event order, and replaying those events reconstructs the current state so a persistent actor can continue after restart. section 1.5.1 section 9.2
A persistent actor follows this command-to-recovery flow:
- Receive a command expressing an intention to change state. section 9.2
- Validate the command by executing it against the actor’s current state. section 9.2
- Generate and append an event when the resulting state is accepted. section 9.2
- Replay the journal’s events after restart to restore the last known state. section 1.5.1 section 9.2
Recovering a conversation
A Conversation actor receives messages and records MessageAdded events in a journal. On startup, it retrieves those events in write order and replays them into its in-memory conversation, avoiding database operations in the actor’s application logic. section 1.5.1 section 1.5.1
Events are immutable facts: changing the event history would remove the approach’s advantage. When event fields evolve, preserve old entries and deserialize multiple versions, supply defaults for added fields, or use event adapters rather than rewriting the journal. section 9.3.5 section 9.3.5
Use the recovery diagram to trace how journaled events rebuild a persistent actor after restart. section 9.2

