清理陈旧的Azure服务总线主题订阅 [英] Cleaning up stale Azure Service Bus topic subscriptions

查看:209
本文介绍了清理陈旧的Azure服务总线主题订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建每个客户端实例订阅和想明白清理陈旧订阅客户端崩溃或意外关闭的良好做法。

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.

有没有办法通过一个主题的所有订阅迭代来检测,如果认购尚未拉到24小时来确定?

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?

我发现<一个href=\"http://stackoverflow.com/questions/12334838/detect-and-delete-orphaned-queues-topics-or-subscriptions-on-azure-service-bus\">Detect并删除在Azure服务总线孤立队列,主题或订阅但它是一个有点过时了。

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

推荐答案

您可以得到 SubscriptionDescription 为每个订阅,并使用 subscriptionDescription.AccessedAt 来接收时间戳为它最后访问时间。

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

这篇关于清理陈旧的Azure服务总线主题订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆