Azure Service Bus Samples

Python SDK for Azure Service Bus Topics

Welcome to the Azure Service Bus Topic Samples for the Python SDK!

Explore these code examples to learn how to effectively use Azure Service Bus topics for reliable messaging in your applications.

Topic Management

Create a Service Bus Topic

Learn how to programmatically create a new Service Bus topic to send and receive messages.

Topic Create Management Python

Delete a Service Bus Topic

Understand how to clean up resources by deleting an existing Service Bus topic.

Topic Delete Management Python

Sending and Receiving Messages

Send Messages to a Topic

Discover how to send messages to a Service Bus topic. Messages sent to a topic are delivered to all subscriptions.

Topic Send Message Python

Receive Messages from a Subscription

Learn how to receive messages from a Service Bus subscription associated with a topic.

Topic Receive Subscription Message Python

Subscription Management

Create a Topic Subscription

Understand how to create subscriptions to a topic. Each subscription acts as a separate queue for messages.

Topic Subscription Create Management Python

Delete a Topic Subscription

Learn how to delete subscriptions that are no longer needed.

Topic Subscription Delete Management Python

Advanced Features

Message Filtering (Rules)

Implement message filtering using rules on subscriptions to control which messages are received.

Topic Subscription Rules Filtering Python

Getting Started

Prerequisites & Setup

Before running these samples, ensure you have the Azure SDK for Python installed and have configured your Azure Service Bus namespace connection string.

Setup Prerequisites Azure CLI Python