I need at-least-once delivery for certain Akka Actor messages, but without persistence. That is, by design the sending actor’s state should be lost after a restart of the application/node, and I am only after the retry-logic.
The trait AtLeastOnceDelivery extends PersistentActor, so there is no way to use it without Event Sourcing, persistenceId, etc. That’s fine, as long as persistence mechanics can be avoided.
What would be the be the best way to implement at-least-once delivery without persistence? Can I just
- mix in
AtLeastOnceDeliveryand use itsdeliverandconfirmDeliverymethods - avoid calls to
persist, - treat
receiveCommandlike a “normal”receivemethod, - make
receiveRecovera no-op
or will that cause undesirable side-effects? - such as unwanted entries for each actor in my journal.
Or is it better to write my own implementation?
Thanks a lot
Ps: Cross posting here - will keep in sync