Search code examples
azureazure-service-fabriccancellationtokensourceservice-fabric-actor

Service Fabric Actors, ReceiveReminderAsync and CancellationTokens


I have an Azure Service Fabric actor that uses reminders.

  • What happens if I delete my service or upgrade it while the actor is in the middle of the ReceiveReminderAsync method?
  • Can I send a cancellation token to the ReceiveReminderAsync method?

Solution

  • Actors follow the single entry pattern by default. While a reminder callback is being processed, no other operations (like Deactivate) can occur. Deletions (unless forced) and upgrades are delayed until the operation completes.

    The receive reminder uses the IRemindable interface. It has no cancellation support.