0
0
Azurecloud~30 mins

Service Bus topics and subscriptions in Azure - Mini Project: Build & Apply

Choose your learning style9 modes available
Service Bus Topics and Subscriptions Setup
📖 Scenario: You are building a messaging system in Azure where multiple services need to receive messages independently. You will use Azure Service Bus topics and subscriptions to distribute messages to different receivers.
🎯 Goal: Create an Azure Service Bus topic and two subscriptions with specific filters to route messages based on their properties.
📋 What You'll Learn
Create a Service Bus topic named orders
Create two subscriptions named highPriority and lowPriority
Add a filter to highPriority subscription to receive messages where priority property equals high
Add a filter to lowPriority subscription to receive messages where priority property equals low
💡 Why This Matters
🌍 Real World
Service Bus topics and subscriptions help distribute messages to multiple independent receivers in cloud applications.
💼 Career
Understanding how to configure topics and subscriptions with filters is essential for cloud engineers working with Azure messaging services.
Progress0 / 4 steps
1
Create the Service Bus topic
Create a variable called topic_name and set it to the string "orders" to represent the Service Bus topic name.
Azure
Need a hint?

Use a simple string assignment to create the topic name variable.

2
Define subscription names
Create two variables called subscription_high and subscription_low with values "highPriority" and "lowPriority" respectively to represent subscription names.
Azure
Need a hint?

Assign the exact string values to the subscription variables.

3
Create filters for subscriptions
Create two variables called filter_high and filter_low with values "priority = 'high'" and "priority = 'low'" respectively to represent SQL filters for the subscriptions.
Azure
Need a hint?

Use SQL-like syntax strings to define the filters exactly as shown.

4
Define the subscription creation commands
Create two variables called create_subscription_high and create_subscription_low that hold the Azure CLI commands as strings to create the subscriptions highPriority and lowPriority on the topic orders with their respective filters filter_high and filter_low. Use the format: az servicebus topic subscription create --resource-group MyResourceGroup --namespace-name MyNamespace --topic-name orders --name subscription_name --rule-name priorityFilter --filter-filter_expression where filter_expression is the filter string.
Azure
Need a hint?

Use escaped quotes for the filter expressions inside the command strings exactly as shown.