Akka Persistence plays events created based on the received commands. Events are generated from command messages after verification and cannot create unacceptable states of actors.
This means that the original received messages (commands) are not necessarily reproduced, but you can save events that are cheaper to use to restore the state of an actor after a failure. Alternatively, you can use snapshots to restore state directly.
Edit: As already mentioned, in the comments it is true that only the state of the actor is saved and is in disaster. This state reflects only consumed messages, and not those that are still in the participants' inbox.
However, instead of pushing messages to an actor, who will then be stored in a secure mailbox, an alternative could be a βrecipientβ to pull messages from a regular participant who keeps a list of messages as part of their state.
UntypedPersistentActorWithAtLeastOnceDelivery as part of akka persistence offers another option when the sender takes care of persistent messages.
I understand that this is not a replacement for reliable mailboxes, since they require a rethinking of the system. So far, work with consumers has worked. Initially, we also looked at message queue products (RabbitMQ with strong queues), but since our initial work items were taken from db, we can handle the aka avaka without lengthy messages.
secure_paul
source share