BestPaid guides · Azure · .NET

SBMP and WindowsAzure.ServiceBus were retired on September 30, 2026: how to move to Azure.Messaging.ServiceBus

If a .NET app still talks to Azure Service Bus through WindowsAzure.ServiceBus or Microsoft.Azure.ServiceBus, it's running on libraries Microsoft no longer supports. If it uses WindowsAzure.ServiceBus with its default SBMP transport, it also depends on a protocol that Microsoft retired on the same day and says can no longer be used, so it has to switch to AMQP. Here is the quick fix and the real one.

Sources: Microsoft's retirement notice for the Service Bus SDK libraries, the guide to using WindowsAzure.ServiceBus with AMQP 1.0, the Integration team's note for BizTalk Server 2020, the Azure SDK's migration guides from WindowsAzure.ServiceBus and Microsoft.Azure.ServiceBus, and its troubleshooting guide and AMQP message body sample. Checked on November 21, 2026. This page is our own summary; follow Microsoft's documentation for every detail.

What ended on September 30, 2026

The quick fix: switch the old library to AMQP

WindowsAzure.ServiceBus uses SBMP unless you tell it otherwise. Microsoft documents how to run version 2.1 or later over AMQP 1.0 instead: add TransportType=Amqp to the connection string, or set the TransportType option where your code creates its clients. AMQP needs outbound ports 5671 and 5672; if only port 443 is open, use TransportType=AmqpWebSockets.

Endpoint=sb://contoso.servicebus.windows.net/;SharedAccessKeyName=app;SharedAccessKey=...;TransportType=Amqp

Test it before you rely on it: a few features behave differently over AMQP in the old library. This buys time; it doesn't make an unsupported library supported. BizTalk Server 2020 customers: Microsoft's note describes a hotfix (KB5091379, for BizTalk Server 2020 CU6 and CU7, available through a support case or the note's temporary download link) that adds AMQP to the SB-Messaging adapter and makes AMQP its default transport.

The real fix: Azure.Messaging.ServiceBus, class by class

WindowsAzure.ServiceBusAzure.Messaging.ServiceBus
MessagingFactory, connection per clientOne ServiceBusClient per namespace, kept for the app's lifetime
QueueClient.Send, TopicClient.SendServiceBusSender.SendMessageAsync, or SendMessagesAsync for batches
QueueClient.OnMessage, SubscriptionClient.OnMessageServiceBusProcessor with ProcessMessageAsync and ProcessErrorAsync
MessageReceiver.ReceiveServiceBusReceiver.ReceiveMessageAsync
BrokeredMessage.Complete, Abandon, DeadLetterCompleteMessageAsync, AbandonMessageAsync, DeadLetterMessageAsync on the receiver, or on the event args in a processor
Sessions: RegisterSessionHandler, AcceptMessageSessionServiceBusSessionProcessor in place of the session handler; AcceptNextSessionAsync for the next available session, or AcceptSessionAsync for a named one
NamespaceManager (create queues, topics, rules)ServiceBusAdministrationClient
BrokeredMessageServiceBusMessage to send, ServiceBusReceivedMessage when received

Coming from Microsoft.Azure.ServiceBus, the old names differ, but they map to the same new types: Message instead of BrokeredMessage, SendAsync on QueueClient, TopicClient or MessageSender, RegisterMessageHandler instead of OnMessage, MessageReceiver.ReceiveAsync, SessionClient.AcceptMessageSessionAsync or RegisterSessionHandler for sessions, ManagementClient instead of NamespaceManager, and a shared ServiceBusConnection where the new library uses one ServiceBusClient.

The trap: message bodies written by the old library

new BrokeredMessage(myObject) serializes the object with DataContractSerializer in binary XML. The new library's Body gives you those bytes as they are, so for messages sent by code that hasn't moved yet message.Body.ToString() returns unreadable text and a JSON deserializer throws. While old senders and new receivers run side by side, read those bodies the old way:

var serializer = new DataContractSerializer(typeof(OrderPlaced));
using var reader = XmlDictionaryReader.CreateBinaryReader(
    message.Body.ToStream(), XmlDictionaryReaderQuotas.Max);
var order = (OrderPlaced)serializer.ReadObject(reader);

Because Microsoft says SBMP can no longer be used, old senders that still run should already be on AMQP, so strings, numbers, byte arrays and the other types in Microsoft's AMQP type mapping arrive as an AMQP value instead: reading Body throws NotSupportedException, and you read them with message.GetRawAmqpMessage().Body.TryGetValue(out object value). Streams and custom objects still arrive in an AMQP data section, custom objects as DataContractSerializer bytes.

Move receivers first, keep them able to read both formats, then move the senders to an explicit format such as JSON with ContentType set.

Order of work

  1. Find every project that references WindowsAzure.ServiceBus or Microsoft.Azure.ServiceBus, including Event Hubs code and BizTalk adapters.
  2. Switch the old library to AMQP where you can't migrate this month, and test it.
  3. Move receivers to Azure.Messaging.ServiceBus with the dual-format body reader, then senders.
  4. Replace connection strings with Microsoft Entra ID sign-in (DefaultAzureCredential or a managed identity) while you're there.

Azure.Messaging.ServiceBus targets .NET Standard 2.0, so it also runs on .NET Framework: the move doesn't force an upgrade to modern .NET.

Old messaging code nobody wants to touch? We move .NET Framework and .NET apps off WindowsAzure.ServiceBus and Microsoft.Azure.ServiceBus to Azure.Messaging.ServiceBus at a fixed price, and to .NET 10 if you want that too. It starts with a $490 audit with a fixed quote.
See the .NET upgrade offer