Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
585 stars 781 forks source link

[Question] How to update subscription-rules with the ServicebusAdministration Client #561

Closed hmrc87 closed 2 years ago

hmrc87 commented 2 years ago

This question is regarding the Azure.Messaging.Servicebus package!

I am wondering how to update an existing topic subscription using the .net Azure.Messaging.Servicebus package. I found a guide that tells me to retrieve the existing subscription via the Servicebus Adminclient. However this only returns a SubscriptionProperties object which I then could use to run UpdateSubscriptionAsync. However this does not allow to set any rules, like an SQLFilterrule on the Subscription.

Can subscription rules only be set when the subscription is created?

hmrc87 commented 2 years ago

nevermind: I did not see the UpdateRule method... https://learn.microsoft.com/en-us/dotnet/api/azure.messaging.servicebus.administration.servicebusadministrationclient.updateruleasync?view=azure-dotnet