It would be great to have at least a single example of filters and actions on this page.
When reading this page without any previous knowledge, it is not clear how filter/action can be used exactly.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi @ddobric Thank you for your feedback! We will review and update as appropriate.
yes, some examples of valid action expressions are needed. Can you point to any examples where we can use an action expression to set the props (from the subscription)?
Hi @spelluru - Any thoughts on this one? Can we enrich this documentation with samples sought above, or point to a repo with samples?
@mike-urnun-msft - I see SQL Filter examples in the article linked from this article:
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-sql-filter
We should add at least one example of each filter in this article. I will take it as an action item and work with Ashish on this.
@axisc - Please share any examples on using these filters. I will update the article. Thanks.
Hi @jwallra - Apologies for the inconvenience that you've experienced with this thread and the long delay occurred here. Per yours and the OP's feedback, we'll proceed to make the necessary updates on this documentation.
Let us not forget a sample for this guys, thank you in advance!
I'm also a newbie with Azure Service Bus and lacking of examples in the documentation is a very bad decision. It will be a year since this feedback was added and it looks like it's hard for the Azure docs team to just add some examples here.
Any updates guys? It's nice to know Service Bus provides server-side filtering feature, but I have no idea how to configure, or where to configure it... Please help.
Here is the sample code I got from the product team. I will update the article now and after getting more samples. Thanks.
// Instantiate the management client
this.mgmtClient = new ManagementClient(connectionString);
// Create the SQL filter and assign
var sqlFilter = new SqlFilter("source=@stringParam");
sqlFilter.Parameters.Add("@stringParam", "orders");
// Instantiate the Rule = Filter + Action
var FilterActionRule = new RuleDescription
{
Name = "filterActionRule",
Filter = sqlFilter,
Action = new SqlRuleAction("SET source='routedOrders'");
};
await this.mgmtClient.CreateRuleAsycn(BasicTopicName, basicSubscriptionName, filterActionRule);