Persistence of Initial State


When a persistent actor is created with an initial state and it doesn’t receive any commands before the server is shutdown, where is the initial state stored and how is it recovered when the server is restarted? I am unable to see any entry in the snapshot or journal tables.

Kind regards

The journal persists the events that mutate the actors state. If the actor remains in its initial state, then there is nothing to persist - the next time it is created, it will be again in its initial state. If there are events, on the other hand, those are then re-applied to the actors initial state.

In other words, the initial state does not need to be persisted. It’s part of the code itself.

1 Like

Thank you!!