We are planning to use azure service bus queue along with topic/subscription.
We have multiple subscriptions for a given topic with different filter conditions.
My question is can we change the filter of subscription dynamically once subscription is created? How can I change the filter condition for subscription once it is created? I cannot find any methods which allows this? The only option I see is delete subscription and recreate it. Any idea how to change filter without deleting subscription?
Correlation Filters - A CorrelationFilter holds a set of conditions that are matched against one or more of an arriving message's user and system properties. A common use is to match against the CorrelationId property, but the application can also choose to match against the following properties: ContentType.
When the delivery count exceeds the limit, the message is moved to the DLQ. The dead-letter reason for the message in DLQ is set to: MaxDeliveryCountExceeded. This behavior can't be disabled, but you can set the max delivery count to a large number.
Configure the filter for the ServiceBus subscription You can set the “Default Filter” when you create a new subscription in Azure ServiceBus Explorer. If you want to change an existing filter, expand the subscription, expand the rules, delete the existing $Default rule and add a new one with your filter expression.
You can use AddRule and RemoveRule on SubscriptionClient to modify the filters in a subscription.
Resources:
I cant be sure it works but if anything will allow you to edit a filter it will be the Service Bus explorer from Paolo http://code.msdn.microsoft.com/windowsazure/Service-Bus-Explorer-f2abca5a
More details in this blog post on it: http://windowsazurecat.com/2011/07/exploring-topics-and-queues-by-building-a-service-bus-explorer-toolpart-1/
Can you create a new one and delete the old one, it is pub/sub after all?
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With