Include a Service Bus Queue Destination

 

Important

Microsoft Azure BizTalk Services (MABS) is being retired, and replaced with Azure Logic Apps. If you currently use MABS, then Move from BizTalk Services to Logic Appsprovides some guidance on moving your integration solutions to Logic Apps.

If you're brand new to Logic Apps, then we suggest getting started here:

Add a Service Bus queue as a destination to a BizTalk Service project.

Important

In a BizTalk Service project, you can represent Service Bus queue destinations that have still not been created. However, representing a non-existent Service Bus queue on a BizTalk Service project designer area does not create the queue.

To add a Service Bus queue to a BizTalk Service project

  1. Create a BizTalk Service project. Get started with a Visual Studio project lists the steps.

  2. Right-click anywhere on the BizTalk Service project design area, select Properties. BizTalk Service URL, enter your BizTalk Services URL.

  3. From the Toolbox, drag and drop the Service Bus Queue Destination to the BizTalk Service project design area.

  4. Right-click the Service Bus Queue component, and then select Properties. Enter the following properties:

    Property Name

    Description

    Associated Project Item

    This is a read-only field and provides the name of the associated .config file. If you change the name of the component on the BizTalk Service project design area by changing the Entity Name property, the name of the .config file also changes.

    Authentication

    Enter how you want to authenticate with the Service Bus Queue. Click the ellipsis (…) next to the Authentication property and then select a value from the Token Provider drop-down.

    • Select Shared Secret, and then enter the issuer name and issuer key.

    • Select Shared Access Signature (SAS), and then enter the key name and key value associated with the SAS.

    Endpoint Configuration Name

    Name of the client endpoint configuration in the .config file that defines which encoding to use. Options are TextEncodedMessageBody and BinaryEncodedSoapEnvelope. Use TextEncodedMessageBody when the receiver is a thick client or REST-based. Use BinaryEncodedSoapEnvelope if the receiver is a WCF service.

    Entity Name

    The name of the queue component on the BizTalk Service project design area. This name should be unique for a BizTalk Service project.

    Important

    The entity name for a Service Bus Queue must only contain alphanumeric characters.

    Runtime Address

    The public runtime endpoint URL where the Service Bus Queue is deployed. Update this field to include your Service Bus namespace.

    1. Click Save.

    How to Read a Message from a Queue

    In scenarios where a message flows from a bridge to a Service Bus Queue, you can read the message from the Queue either as REST or SOAP. For REST, you can use the following code snippet to read the message:

    BrokeredMessage brmsg; 
    Stream actualStream = brmsg.GetBody(); 
    XmlReader actualReader = XmlReader.Create(actualStream); 
    Message msg = Message.CreateMessage(MessageVersion.Default, "*", actualReader);
    

    For SOAP, you could read the message as a WCF message. For a sample, see the WCF Channel Session sample at https://go.microsoft.com/fwlink/p/?LinkId=237002.

    See Also

    Add a Message Destination to the bridge