0

I am running a stateless service in Azure Service Fabric in the .NET Framework. I want to perform some clean up activities, and remove some configurations from the registry if all of my applications get deleted from a node in my Service Fabric Cluster. Is there any way that I can do this?

Super Jade
  • 5,609
  • 7
  • 39
  • 61
Kiran
  • 747
  • 2
  • 10
  • 35

1 Answers1

1

Yes, you can do this by registering notification callbacks. Register for all applications and services by using this code:

var filterDescription = new ServiceNotificationFilterDescription
{
    Name = new Uri("fabric:"),
    MatchNamePrefix = true
};

You interpret a notification with no endpoints as a service deletion.

Have a look at this question too.

LoekD
  • 11,402
  • 17
  • 27