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
AtLeastOnceDelivery
and use itsdeliver
andconfirmDelivery
methods - avoid calls to
persist
, - treat
receiveCommand
like a “normal”receive
method, - make
receiveRecover
a 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