Build SQL and correlation filters for Service Bus topic subscriptions.
Last verified: May 2026
Build SQL and correlation filters for Service Bus topic subscriptions.
Required Fields
topicNamesubscriptionNamefilterTypesqlExpressioncorrelationOutput will appear here...Your team's e-commerce event topic has 12 subscriptions, each filtering by region. Currently all use SQL filters like 'region = ''us-east''' — and message latency has crept up to 800ms p95. The builder helps you migrate to correlation filters (set region as a system property, use exact-match correlation). Latency drops to 50ms p95, and Service Bus throughput capacity nearly doubles without any infrastructure change.
The Azure Service Bus Topic Filter Builder helps you construct subscription filter rules for Azure Service Bus topics. Filters determine which messages from a topic are delivered to each subscription, enabling message routing patterns like content-based routing and pub/sub fanout. This tool supports SQL filters, correlation filters, and actions, generating the rule definitions you can apply via the Azure portal, CLI, SDK, or ARM templates.
The builder generates Service Bus subscription rule definitions in two forms: correlation filters (ContentType, Label, To, ReplyTo, MessageId, etc., all exact-match) and SQL filters (SQL-like expressions over message system properties and user properties). Output is provided as az servicebus topic subscription rule create commands and as ARM template/Bicep resources for IaC.
Correlation filters are 10-100x faster than equivalent SQL filters because they use exact-match indexing instead of expression evaluation. For high-throughput topics (>1,000 msg/sec), use correlation filters wherever possible — even if you have to add an explicit property to the message just to enable correlation matching.
Each subscription with SQL filters costs CPU on every published message — Service Bus evaluates the filter expression for every subscription on every message. With 20+ subscriptions all running SQL filters, you'll see message latency rise. Consolidate similar subscriptions or move filtering to consumer-side logic.
Filter actions can rewrite message properties as messages are delivered. This is powerful for simplification (e.g., normalizing region names from 'us-east-1' to 'east' for downstream simplicity) but easy to misuse — actions are invisible to publishers, leading to debugging confusion. Document them explicitly in subscription names.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.