Please note, a newer package is available at https://nuget.org/packages/Azure.Messaging.ServiceBus as of 11/2020.
While this package will continue to receive critical bug fixes, we strongly encourage you to upgrade.
See the Migration Guide at https://aka.ms/azsdk/net/migrate/sb for more details.
Install-Package Microsoft.Azure.ServiceBus -Version 5.2.0
dotnet add package Microsoft.Azure.ServiceBus --version 5.2.0
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.2.0" />
paket add Microsoft.Azure.ServiceBus --version 5.2.0
#r "nuget: Microsoft.Azure.ServiceBus, 5.2.0"
// Install Microsoft.Azure.ServiceBus as a Cake Addin #addin nuget:?package=Microsoft.Azure.ServiceBus&version=5.2.0 // Install Microsoft.Azure.ServiceBus as a Cake Tool #tool nuget:?package=Microsoft.Azure.ServiceBus&version=5.2.0
Azure Service Bus client library for .NET
Please be aware that a newer package, Azure.Messaging.ServiceBus is available as of November 2020. While this package will continue to receive critical bug fixes, we strongly encourage upgrading for new development. Please see the migration guide for more details.
Azure Service Bus allows you to build applications that take advantage of asynchronous messaging patterns using a highly-reliable service to broker messages between producers and consumers. Azure Service Bus provides flexible, brokered messaging between client and server, along with structured first-in, first-out (FIFO) messaging, and publish/subscribe capabilities with complex routing.
This directory contains the open source subset of the .NET SDK. For documentation of the complete Azure SDK, please see the Microsoft Azure .NET Developer Center.
Use the client library for Azure Service Bus to:
Transfer business data: leverage messaging for durable exchange of information, such as sales or purchase orders, journals, or inventory movements.
Decouple applications: improve reliability and scalability of applications and services, relieving senders and receivers of the need to be online at the same time.
Control how messages are processed: support traditional competing consumers for messages using queues or allow each consumer their own instance of a message using topics and subscriptions.
Implement complex workflows: message sessions support scenarios that require message ordering or message deferral.
The complete Microsoft Azure SDK can be downloaded from the Microsoft Azure Downloads Page and ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more.
If you are not already familiar with Azure Service Bus, please review: What is Azure Service Bus.
For the best development experience, developers should use the official Microsoft NuGet packages for libraries. NuGet packages are regularly updated with new functionality and hotfixes.
Microsoft Azure Subscription: To call Microsoft Azure services, including Azure Service Bus, you need to first create an account. If you do not have an existing Azure account, you may sign up for a free trial or use your MSDN subscriber benefits.
The Azure Service Bus client library shares the same Prerequisites as the Microsoft Azure SDK for .NET.
Code samples for the Azure Service Bus client library that detail how to get started and how to implement common scenarios can be found in the following locations:
For information on building the Azure Service bus client library, please see Building the Microsoft Azure SDK for .NET
Deploy the Azure Resource Manager template located at sdk/servicebus/Microsoft.Azure.ServiceBus/assets/azure-deploy-test-dependencies.json by clicking the following button:
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-sdk-for-net%2Fmaster%2Fsdk%2Fservicebus%2FMicrosoft.Azure.ServiceBus%2Fassets%2Fazure-deploy-test-dependencies.json" target="_blank"> <img src="http://azuredeploy.net/deploybutton.png"/> </a>
Running the above template will provision a standard Service Bus namespace along with the required entities to successfully run the unit tests.
Add an Environment Variable named
SERVICE_BUS_CONNECTION_STRINGand set the value as the connection string of the newly created namespace. Please note that if you are using Visual Studio, you must restart Visual Studio in order to use new Environment Variables.
Once you have completed the above, you can run
dotnet test from the
For additional insight and context, the development, release, and issue history for the Azure Service Bus client library will continue to be available in read-only form, located in the stand-alone Azure Service Bus .NET repository.
The Azure Service Bus client library uses the semantic versioning scheme.
For information about the target frameworks of the Azure Service Bus client library, please refer to the Target Frameworks of the Microsoft Azure SDK for .NET.
NuGet packages (309)
Showing the top 5 NuGet packages that depend on Microsoft.Azure.ServiceBus:
Pluggable foundation blocks for building distributed apps.
BumperLane service client.
This package provides a C# based durable task framework for writing long running applications.
GitHub repositories (33)
Showing the top 5 popular GitHub repositories that depend on Microsoft.Azure.ServiceBus:
The core infrastructure backend (API, database, Docker, etc).
Distributed transaction solution in micro-service base on eventually consistency, also an eventbus with Outbox pattern
Lightweight workflow engine for .NET Standard
A .NET Standard 2.0 Workflows Library
The host/runtime that powers Azure Functions