Configure Service Bus Topic Subscriptions with Message Filtering
Create Service Bus topic subscriptions and configure SQL and correlation filter rules to route messages in an order processing scenario in this hands-on lab.

Lab overview
Azure Service Bus topics implement the publish-subscribe messaging pattern, allowing a single message to be delivered to multiple subscribers simultaneously. Unlike queues, which deliver each message to a single consumer, topics broadcast messages to all matching subscriptions - making them ideal for scenarios like event-driven architectures where different downstream systems need to react to the same event stream. The real power of topics comes from subscription filter rules, which let the broker evaluate message properties and route each message to only the subscriptions whose filters match, eliminating the need for application-level routing logic.
In this lab, you will work with an order processing scenario where different downstream services need different subsets of order messages. You will create topic subscriptions with SQL filter rules to route high-value orders to a fraud check service, international orders to a customs service, and all orders to an analytics service. You will then add a correlation filter for a fourth subscription and send test messages with custom properties to verify that the broker routes each message to the correct subscriptions.
Objectives
Upon completing this Intermediate level lab, you will be able to:
- Create a Service Bus topic and multiple subscriptions using the Azure CLI
- Configure SQL filter rules to route messages based on custom properties such as order value and country
- Implement a catch-all subscription using a default true filter for analytics processing
- Send test messages with application properties and verify correct routing to each subscription
- Add a correlation filter for a fourth subscription and compare behavior with SQL filters
- Test filter priority and observe how messages match multiple subscriptions simultaneously
Who is this lab for?
This lab is designed for:
- Cloud developers preparing for AZ-204 or working with event-driven messaging patterns
- Solution architects designing pub/sub systems with content-based message routing
- Solution Architects architecting event-driven systems using Azure Service Bus topics and subscriptions
Basic familiarity with the Service Bus resource and command-line tools is recommended.
Verified against your live environment
An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed, not multiple choice, real-world proficiency.
More labs like this
Build an Event-Driven Messaging Solution with Azure Service Bus
Create Service Bus queues and topics, build producer-consumer messaging, implement subscription filters, and handle dead-letter queues.
Configure Azure Monitor Alerts and Action Groups for App Service
Create metric alerts, log search alerts, and action groups to monitor an Azure App Service and respond to threshold breaches.
Creating a Web App on Azure App Service using Azure Portal
Learn how to create, configure, and deploy a web application using Azure App Service through the Azure Portal's interface.
Related reading
Environment
Every lab includes
- Real environment, pre-credentialed
- Automated checks on every step
- Isolated sandbox, auto cleanup
- AI-recommended next steps
Lab curriculum
- 01
Logging into Azure CLI
- 02
Create a Service Bus Topic and Subscriptions
1 automated check
- 03
Configure SQL Filter Rules for Message Routing
1 automated check
- 04
Send Test Messages and Verify Subscription Routing
1 automated check
- 05
Add a Correlation Filter and Test Filter Priority
1 automated check
Skills validated
Not the lab you were looking for?
Browse 200+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.