I was wondering how to handle failure using akka persistance and cluster sharding.
When the client send a command, the command hit a node then the command is routed to the good shard and then handled by the persitant actor.
From the client side, I want to have a response to tell the end user what append: command invalid, failure …
When something bad append in the cluster I think the caller will end with an AskTimeoutException. In that case how could I know if the command has been handled or not, to notify to the end user ?
For example, if the command is handled by the persistant actor but the node handling the sharding crash at the same moment, the caller will end with an AskTimeoutException but the command is handled.
If the persistant actor crash, the caller will end with an AskTimeoutException and the command is not handled.
What is the best way to handle those cases ?