Auto-expire orphaned Subscription (Azure ServiceBus Messaging SubscriptionClient)

前端 未结 3 1327
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-12 02:37

The scenario I have in mind is this: Service Bus is used for instance-to-instance communication, so a Subscription is unique per service instance. The end result is that if

3条回答
  •  囚心锁ツ
    2021-01-12 03:30

    Starting with Azure SDK 2.0 this works as expected.

    Also, contrary to other reports, in my testing, subscription does not get deleted as long as there is a pending receiver listening to that subscription.

    var description = new SubscriptionDescription(topicPath, subscriptionId);
    description.AutoDeleteOnIdle = TimeSpan.FromSeconds(600);
    namespaceManager.CreateSubscription(description);
    

提交回复
热议问题