Service Bus messaging samples or examples

The Service Bus messaging samples demonstrate key features in Service Bus messaging. Currently, you can find the samples in the following places.

Important

The Azure Service Bus libraries WindowsAzure.ServiceBus, Microsoft.Azure.ServiceBus, and com.microsoft.azure:azure-servicebus will be retired in Azure China on October 31, 2026. After that date, they will no longer receive official support or updates. Applications can continue to use these libraries with AMQP after retirement, but migrate to a current library to continue receiving security updates and bug fixes.

For Service Bus, migrate to Azure.Messaging.ServiceBus for .NET or com.azure:azure-messaging-servicebus for Java. See the migration guides for WindowsAzure.ServiceBus, Microsoft.Azure.ServiceBus, and com.microsoft.azure:azure-servicebus.

SBMP will also be retired in Azure China on October 31, 2026. Use AMQP for Service Bus messaging. Support for WindowsAzure.ServiceBus with Azure WCF Relay continues until further notice. For background, see the global retirement announcement.

.NET samples

Package Samples location
Azure.Messaging.ServiceBus (latest) Code samples

Java samples

Package Samples location
azure-messaging-servicebus (latest) Code samples

Spring samples

Package Samples location
spring-cloud-azure-starter-servicebus-jms GitHub location
spring-cloud-azure-starter-integration-servicebus GitHub location
spring-cloud-azure-stream-binder-servicebus GitHub location

Python samples

Package Samples location
azure.servicebus Code samples

TypeScript samples

Package Samples location
@azure/service-bus Code samples

JavaScript samples

Package Samples location
@azure/service-bus Code samples

Go samples

Package Samples location
azservicebus GitHub location

Management samples

You can find management samples on GitHub at https://github.com/Azure/azure-service-bus/tree/master/samples/Management.