1

I create subscriptions per client instance and would like to understand good practices on cleaning up stale subscriptions if the client crashes or closes unexpectedly.

Is there any way to determine by iterating through all the subscriptions of a topic to detect if the subscription hasn't been pulled for 24 hrs?

I found Detect and Delete Orphaned Queues, Topics, or Subscriptions on Azure Service Bus but it's a bit dated.

Community
  • 1
  • 1
kjsteuer
  • 617
  • 1
  • 6
  • 14

1 Answers1

0

You can get the SubscriptionDescription for each subscription and use subscriptionDescription.AccessedAt to receive a timestamp for the last time it was accessed.

TheDude
  • 3,796
  • 2
  • 28
  • 51