Cleaning up stale Azure Service Bus topic subscriptions [duplicate]

孤者浪人 提交于 2020-01-16 05:22:49

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/15871119/cleaning-up-stale-azure-service-bus-topic-subscriptions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!