Jamie Allen helps me on Twitter to answer this question. The twitter conversation is this.
I try to summarize the discussion what Jamie said.
For reliable at-least-once, using Akka Cluster and Persistence to get it done is possible, but probably overkill. I say try to keep it simple. Have a GUID for the request, and send it with the request to the three SKs.
In the immutable ledger scenario, you'd then occasionally sweep the ledger to get rid of dups by GUID. How consistent that data needs to be will define that.
Simplicity is going to be a lot easier to maintain & avoid partial failures. You can handle idempotency on the SK side one of a few ways: either track all GUIDs when the requests are processed via an expiring cache, or store the GUIDs with the immutable updates in a ledger.
So, in this case, the better solution is to remove Akka Persistence completely and reduce the problem to good old message passing.
SF
sends messages to SK
s actors, the Cameo node waits for SK
s responses. If such reactions don't arrive in a predetermined window of time, the Cameo node alerts SF
using a timeout message. SF
resends messages to SKs actors again.
The diagram that represents the above solution is the following.
The message in red, marked with number 5, models the timeout message.
As Jamie said:
I think ACK has to be the responsibility of the caller, all the way back to the sender of the original request. That’s the safest & simplest approach.
Hope it helps.