azure-service-fabricservice-fabric-actor

Service fabric actor reminders and duplicate messages


The Service Fabric documentation states that:

Actors may receive duplicate messages from the same client.

Does this hold for reminders as well? If I set a single reminder for my actor instance, could it be called twice at the same time?


Solution

  • My team submitted a similar question to Service Fabric support, and this was their response...

    *"If there is a failover (i.e. current primary becomes secondary or primary process crashes) while ‘ReceiveReminderAsync()’ call back is executing or failover kicks in after ‘ReceiveReminderAsync()’ completes but before ActorRuntime does automatic save state and notes down completion, on the new primary this reminder will fire again immediately.

    Note that in this scenario, as the new primary comes up and invokes the reminder, the reminder callback in previous primary may be still be executing (and will eventually fail to make any local state changes as replica has become secondary)."*

    This behavior seems entirely consistent with why a public actor method would be invoked twice.