--- title: "Set up Service Bus queue connector" slug: "set-up-service-bus-queue-connector-task" tags: ["Connectivity Studio", "CS", "Task"] status: "update" updated: 2026-09-22T13:18:59Z published: 2026-09-22T13:18:59Z canonical: "docs.staedean.com/set-up-service-bus-queue-connector-task" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Set up Service Bus queue connector Set up a connector of type **Service Bus queue**. Use this connector type to exchange information via an Azure Service bus queue or topic. You can use the **Service Bus queue** connector to: - Export data: Use a Connectivity Studio export message to send messages to the applicable Service Bus queue or Service Bus topic. The export message must have the **Service Bus queue** connector as target connector. On export, each message that is sent to a queue or topic is logged in the **Data sent to queue** history table. - Import data: 1. Run **Receive queue data** to receive messages from a Service Bus queue or a Service Bus topic subscription. The received messages are added to the **Received data from queue** table in Connectivity Studio. These [receive modes](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions#receive-modes) are supported: '**Receive and delete**' and '**Peek lock**'. 2. Run import messages to read data from the **Received data from queue** table and import this data into D365 F&SCM. The import message must have the **Service Bus queue** connector as source connector. The related document defines which data is sent to or received from a queue or topic and in which format and structure. So, the document does not result in a file. With the **Service Bus queue** connector, you can use these external file-based documents: **EDI**, **Fixed text**, **Text**, **XML**, **JSON**. You can only use this connector in combination with a document for which the version 3 (V3) handler class is selected. ### Steps 1. Click **Connectivity studio - Integration Design**. 2. Click the **Connectors** tab. 3. Click **New**. 4. In the **Connector** field, type a value. > [!NOTE] > **Note** > > You are advised to not include, in the connector name, the name of the application to which you connect. Use the **Application** field to define the applicable application for the connector. 5. In the **Project** field, enter or select a value. 6. Define the applicable application for the connector. For a web service connector, for example, select a 'Service Bus' application. In the **Application** field, enter or select a value. > [!NOTE] > **Note** > > - You can only select an application that is defined for the applicable project. You can define project applications on the Projects page. > - You can type any existing application name, whether it is defined as project application or not. If the typed application is not defined as project application, it is automatically added to the project applications. 7. In the **Connector type** field, select '**Service bus queue**'. 8. Sub-task: Set properties. 1. You can export connectivity setup and import it in another D365 F&SCM environment. For example, you first set up and test the connectivity setup in a development environment. When finished, you deploy the setup in your production environment. To prevent messing up your production data, use different file locations for your development or testing environment and for your production environment. To strictly distinguish between different environments, you can define unique connector properties for each of your environment types. So, each connector can have a different set of properties for each applicable environment type. Which connector properties are applicable to the current environment is defined in the **Environment type** field on the **Connectivity studio parameters**. **Example**: If set to **Development**, the connector properties, as defined for environment type **Development** are applicable. In the **Environment types** field, select an option. > [!NOTE] > **Note** > > The environment types only apply to connectors of type **Database**, **Azure file storage**, **Blob storage**, **SharePoint**, or **Service Bus queue**. 2. Expand the **Properties** section. 3. In the **Service Bus namespace** field, enter the name of the Service Bus namespace as created in the Azure portal. 4. The **Service Bus queue** connector supports these Service Bus entity types: In the **Service bus type** field, select an option. > [!NOTE] > **Note** > > If you use a Service Bus: > > - Queue, only fill in the **Entity name** field. > - Topic, fill in both the **Entity name** field and the **Subscription** field. - **Queue**: Queues provide First In, First Out (FIFO) message delivery to one or more competing consumers. That is, receivers typically receive and process messages in the order in which they were added to the queue. And only one message consumer receives and processes each message. - **Topic and subscriptions**: Topics and subscriptions provide a one-to-many form of communication in a publish and subscribe pattern. It's useful for scaling to large numbers of recipients. Each published message is made available to each subscription registered with the topic. Publisher sends a message to a topic and one or more subscribers receive a copy of the message, depending on filter rules set on these subscriptions. 5. In the **Entity name** field, enter the name of the Service Bus queue or Service Bus topic as created for the applicable Service Bus in the Azure portal. 6. In the **Subscription** field, enter the name of the Service bus topic subscription as created in the Azure portal. 7. In the **Policy name** field, enter the name of the Shared access signature (SAS) policy that is used to access the Service Bus queue or topic. 8. Enter the policy key or policy key reference of the Shared access signature (SAS) policy that is used to access the Service Bus queue or topic. Whether the policy key or policy key reference applies is defined by the **Display secret** field in the **Connectivity studio parameters**. If the **Display secret** parameter is set to: In the **Policy key** field, or in the **Policy key reference** field, type a value. - **Secret**, fill in the **Policy key** field with the primary key of the Shared access signature (SAS) policy. The policy key is specific for the current connector. - **Secret reference**, fill in the **Policy key reference** field with the desired secret reference. The policy key reference refers to the centrally stored primary key of the Shared access signature (SAS) policy which makes updating secrets easier. - **Both**, fill in either the **Policy key** field or the **Policy key reference** field. 9. By default, the SMQB protocol is used. If the used Service Bus only supports the AMQP protocol, set this field to **Yes**. Select **Yes** in the **Use AMQP protocol** field. > [!NOTE] > Note > > Starting from BIS version 10.0.49.74, only the AMQP protocol is supported. Therefore, the **Use AMQP protocol** field is by default set to **Yes** and removed from the UI. 10. Define the format that is used to read the Service Bus message body content: In the **Check format** field, select an option. - **String**: Reads the body content as a string. - **Bytes**: Reads the body content as a byte array. 11. Define the time out (in seconds) that is applied when data is received from the Service Bus queue. A general rule for setting the appropriate time out: The larger the message size, the longer the time out. In the **Time out (secs)** field, enter a number. > [!NOTE] > Note > > This timeout is related to: > > - The **Service Bus Timeout** as defined in the **Connectivity Studio parameters**. > - A hard-coded timeout of 300 seconds (5 minutes). > > When two or three of these timeout settings are configured, the higher value of these is applied. 9. Sub-task: Set write options. 1. Expand the **Write** section. 2. A Service Bus queue or topic message has a **Content** field. On write (creation of the message), you can fill this field to provide some extra information about the content of the message. You can use one of these types of information as content of the message: In the **Content info** field, select an option. - **Message ID**: The name of the applicable message. - **Document ID**: the name of the applicable document. - **Root record**: the name of the root record as defined in the applicable document. - **Write filename**: The Write filename as defined on the header of the applicable document. - **Read filename**: The Read filename as defined on the header of the applicable document. 3. A Service Bus queue or topic message has a **Subject** field. On write (creation of the message), you can fill this field to provide some extra information about the subject of the message. You can use one of these types of information as subject of the message: In the **Subject info** field, select an option. - **Message ID**: The name of the applicable message. - **Document ID**: the name of the applicable document. - **Root record**: the name of the root record as defined in the applicable document. - **Write filename**: The Write filename as defined on the header of the applicable document. - **Read filename**: The Read filename as defined on the header of the applicable document. 10. Sub-task: Select custom handler. 1. Expand the **Custom** section. 2. For a **Service Bus queue** type connector, the standard handler class is **BisConnectorStreamSBQueue**. This handler class exports data to or imports data from an Azure Service Bus queue or topic. You can use a customized handler class. To do so, extend the standard handler class. In the **Handler** field, enter or select a value. 11. Sub-task: Set advanced options. 1. Expand the **Advanced options** section. 2. A document can have a query for which cross-company is enabled. If a user, with access to a restricted set of companies, runs a message that uses the document, the cross-company option does not work. If you have this scenario, make sure the cross-company option is enabled for the used connector. Otherwise, you can disable the cross-company option. Select **Yes** in the **Cross company disabled** field. 12. Close the page. > [!NOTE] > **Notes** > > You can test the connection. To do so, on the **Connectors** page, in the **Action Pane**, on the **Development** tab, click **Test** **connection**. ## Related - [Data export to Azure Service Bus queue or topic](/data-export-to-azure-service-bus-queue-or-topic.md) - [Data import from Azure Service Bus queue or topic subscription](/data-import-from-azure-service-bus-queue-or-topic-subscription.md) - [Data import from Azure Service Bus dead letter queue](/data-import-from-azure-service-bus-dead-letter-queue.md) - [Set up secret references](/set-up-secret-references.md)