Stateful actors and completion of method calls

143 views Asked by At

If a call is made to a stateful actor in service fabric and actor fails to complete the method (say, the machine on which it is running rebooted/crashed), will the method resume (or restart) on one of the replicas promoted to primary?

2

There are 2 answers

0
CBlunt On

not sure if the method that was running prior to the crash would continue. But as far as I know, one of the replicas would be promoted to primary.

0
Robert On

You have to add a fault-handling retry pattern to your calling code, see https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-services-communication

This means that after a number of retries, the caller will be able to get a successful answer, after the called actor gets back online.