question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Host.AzureServiceBus] Supporting Subscription Sql Filter

See original GitHub issue

I found this library is perfect for those developers who are working on Messaging applications.

As you know, Azure Service Bus allows defining SqlFilter for every subscription and I’m looking forward to the library soon supporting defining SQL filter when adding Consumer.

Here is a sample code snip when registering the consumer.

 mbb.Produce<BusMessage>(x => x.DefaultTopic("topic-1").
             .WithModifier((message, busMessage) =>{
                        busMessage.ApplicationProperties.Add(nameof(message.Name), message.Name);
             })
        .Consume<BusMessage>(c=>c.Topic("topic-1")
            .SubscriptionName("sub-1")
            .PrefetchCount(10)
            .Instances(1)
            .WithConsumer<BusMessageHandler>()
            .WithSqlFilter("Name=HelloWorld")
 )

Thanks Steven

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zaruszcommented, Jul 14, 2022

Glad to hear that. If you have more suggestions please open another issue. PRs are also welcome!

1reaction
baoduycommented, Jul 14, 2022

Hi @zarusz I have checked and it works well. Thank you so much for your quick response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Service Bus Subscription Rule SQL Filter syntax
A SQL filter is one of the available filter types for Service Bus topic subscriptions. It's a text expression that leans on a...
Read more >
Topic filters and actions - Azure Service Bus
A SqlFilter holds a SQL-like conditional expression that's evaluated in the broker against the arriving messages' user-defined properties and ...
Read more >
service-bus-filter-examples.md
Set subscription filters (Azure Service Bus). This article provides a few examples on setting filters on subscriptions for Service Bus topics.
Read more >
Auto Filtered Subscriptions in Azure Service Bus Topics
A SQL Filter has a SQL – Like conditional expression that is evaluated in the broker on the arriving messages' system and user-defined ......
Read more >
Azure Service Bus - SQL Filters - The Long Walk
To set up a SQL Filter, you can use the SDK, some kind of IaC (Terraform for example), or you can simply edit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found