In Akka Typed, does a persisted actor receive a new Command before the Event has been processed, and the State updated? Or is the Event guaranteed to be processed before a new command is received from the actor’s inbox?
Edit: Another way of framing the question:
Do I have to design against check-then-act race conditions when reading state in the command handler, and then acting on it (based on the event) in the event handler?
Also worth noting is that the way that persistence does this is to stash all incoming messages until it receives the message confirming the storage of the Event.
The reason this is worth noting is that it means monitoring stash size with Telemetry is useful in monitoring persistence.