Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure service bus queue subcription filter change

Tags:

.net

azure

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?

like image 645
bhavesh lad Avatar asked Apr 20 '12 06:04

bhavesh lad


People also ask

What is correlation filter in Azure Service Bus?

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.

What happens when Service Bus queue max delivery count exceeds?

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.

How do I filter messages in Service Bus Explorer?

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.


2 Answers

You can use AddRule and RemoveRule on SubscriptionClient to modify the filters in a subscription.

Resources:

  • MSDN
  • Using Rule Actions in Windows Azure Service Bus Subscriptions
like image 52
Sandrino Di Mattia Avatar answered Sep 19 '22 22:09

Sandrino Di Mattia


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

like image 38
user728584 Avatar answered Sep 21 '22 22:09

user728584