This document provides guidance on how to integrate NServiceBus endpoints with non-NServiceBus endpoints by sharing an Azure Service Bus (ASB) namespace as mutual communication channel.
The following points need to be taken into account when integrating
Both the ASB SDK and the transport make assumptions about the format of exchanged
BrokeredMessageinstances. Refer to Brokered Message Creation to learn about these assumptions and how to align the sending and receiving endpoints at the wire level.
The transport assumes a specific layout of ASB entities depending on the selected topology; any non-NServiceBus endpoint is expected to use the correct entities for each purpose. In general, the following rule applies: queues are for sending, and topics are for publishing. To learn more about the layouts of the built in topologies, refer to Azure Service Bus Transport Topologies.
By default, the transport creates its own entities when they don't exist in the namespace. But non-NServiceBus endpoints may require manual creation of entities. Refer to the Azure Service Bus documentation for more information on available ASB SDKs and tools to perform these tasks.
The native message must allow NServiceBus to detect the message type either via the headers or the message payload.
The following sample shows how to use the native integration capabilities of the Azure Service Bus transport between an NServiceBus endpoint and a regular .NET application.