Edit

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.

On 30 September 2026, we'll retire the Azure Service Bus SDK libraries WindowsAzure.ServiceBus, Microsoft.Azure.ServiceBus, and com.microsoft.azure.servicebus, which don't conform to Azure SDK guidelines. We'll also end support of the SBMP protocol, so you'll no longer be able to use this protocol after 30 September 2026. Migrate to the latest Azure SDK libraries, which offer critical security updates and improved capabilities, before that date.

Although the older libraries can still be used beyond 30 September 2026, they'll no longer receive official support and updates from Microsoft. For more information, see the support retirement announcement.

.NET samples

Package Samples ___location
Azure.Messaging.ServiceBus (latest) Code samples
Microsoft.Azure.ServiceBus (legacy) GitHub ___location

Java samples

Package Samples ___location
azure-messaging-servicebus (latest) Code samples
azure-servicebus (legacy) GitHub ___location

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.