# mulesoft Azure Service Bus Connector - Full Documentation --- product: Azure Service Bus Connector version: 3.4 --- # Azure Service Bus Connector 3.4 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) makes it easy to build integrations that send messages to and receive messages from Azure Service Bus, which is an asynchronous messaging cloud platform. This connector supports communication with queues and topics and can perform actions such as: - Send to queue - Send to topic - Receive from queue - Receive from subscription To use the Azure management API for CRUD operations of queues, topics, subscriptions, and rules, use Anypoint Connector for Azure Service Bus Management (Azure Service Bus Management Connector). > [!NOTE] This connector supports integrations with Azure Service Bus (cloud). It does not work with > Microsoft Service Bus (on-premises). To connect with Microsoft Service Bus on-premises, use > Anypoint Connector for Microsoft Service Bus. > > This connector does not work with Event Hubs. For compatibility information and fixed issues, see the release notes. ## Before You Begin To use this connector, you must be familiar with: - The Azure Service Bus APIs - Anypoint connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio Before creating an app, you must have: - Access to the Azure target resource - Anypoint Studio or Anypoint Code Builder ## Audience - New user To create your Mule app, see: - [Studio Configuration](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-studio) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-examples), which provides one or more use cases for the connector. - Advanced user - Read the following: - [XML and Maven Support](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-xml-maven) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-examples) topics ## Authentication Types Azure Service Bus Connector supports the following connection types to connect to Azure: - Shared Access Signature (SAS) - Azure Active Directory (AAD) For information about configuring these authentication types, see [Using Anypoint Studio to Configure Azure Service Bus Connector](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-studio). ## Next Step After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Azure Service Bus Management Connector](https://docs.mulesoft.com/azure-service-bus-management-connector/latest/) - [Azure Service Bus Connector on Exchange](https://anypoint.mulesoft.com/exchange/com.mulesoft.connectors/mule-azure-service-bus-connector/) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.4 --- # Azure Service Bus Connector 3.4 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The examples in this section show application flows that: - [Sends messages to and receives messages](#send-receive) from Azure Service Bus - [Sends and listens](#send-listen-ack) for messages and receives an acknowledgment using the `MANUAL` acknowledgment type - [Sends and receives batch messages](#batch-send-receive) - [Using Azure Active Directory connector provider](#using-aad-connector) These examples use variables for some field values. You can either: - Replace the variables with their values in the code - Provide the values for each variable in a properties file and then refer to that file from the connector configuration For more information about using a properties file, see [Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure) ## Create a Mule Project After you create a new Mule project and configure your credentials, you can create an application flow for each example by using the provided XML code. To create a Mule project: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. 3. Create a file named `mule-app.properties` and save it in `/src/main/resources`. 4. Configure your Azure connection credentials in the file `mule-app.properties`, and include the name of the Azure queue you created, for example: #============================================================== #Connection Parameters #============================================================== # Azure common authentication configuration azure.namespace=myazure queue.name=mytestqueue # Shared Access Signature authentication azure.keyname=SAStokenname azure.key=SAStoken # Azure Active Directory authentication azure.tenantId=TenantId azure.clientId=ClientId azure.clientSecret=ClientSecret 5. Save the file. 6. Open the **Global Element Configuration** and click **Test Connection** to verify your credentials. ## Send and Receive Example This flow shows an example of how to use the **Send** and **Receive From Queue** operations to send and receive messages: ![Example Azure Service Bus flow that uses the Send and Receive From Queue operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.4/_images/azure-service-bus-send-receive.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Batch Send and Receive Example This application flow uses the **Send batch** and **Receive Batch** operations to send and receive batches of messages to and from an Azure Service Bus queue. The following screenshot shows the application flow for sending and receiving batch messages: ![Application flow that shows sending and receiving batch messages](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.4/_images/azure-service-bus-send-receive-batch.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. Save the project. 5. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send, Listen, and Acknowledge the Message Example This application flow uses the **Send** and **Message Listener** operations. The **Message Listener** is using the `MANUAL` acknowledgment type, which means that the application logic is responsible for acknowledging receipt of the message. In this example, that logic is provided by adding the **Complete** operation to the same flow as the **Message Listener**. The following screenshot shows this flow: ![Application flow that shows how the Send, Message Listener, and Complete operations are used](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.4/_images/azure-service-bus-send-listen-manual-ack.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Using Azure Active Directory Connector Provider Some organizations use Azure Active Directory to authenticate their instances. Any of the previous examples can be modified to support this scenario. Replace the Shared Access Signature authentication with the Azure Active Directory authentication: ```xml ``` ```xml ``` Ensure that: - Your `mule-app.properties` file contains the **Tenant Id**, **Client Id**, and **Client Secret** fields. - Your app registration contains the proper [permissions and roles](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application). ## See Also - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.4 --- # Azure Service Bus Connector 3.4 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) enables message integration with Azure Service Bus on the cloud. --- ## Configurations ### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Whether to specify a correlation ID when publishing messages. This applies both for custom correlation IDs specified at the operation level and for default correlation IDs taken from the current event.

AUTO

Zone Id

String

Zone ID property is used to identify the rules used to convert between an Instant and LocalDateTime. If the Zone ID equals Z, UTC is used. If the Zone ID is not specified, the system default Zone ID is used.

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

#### Connection Types ##### Shared Access Signature The SAS connection type uses the SAS Key Name and the SAS Key to generate a token, which is used by the Azure Service Bus SDK to establish the connection to the Service Bus instance. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

The namespace contains the resources to which the connector can establish a connection.

x

Shared access key name

String

Name of the Shared Access key

x

Shared access key

String

Shared Access key

x

Security

TLS

TLS enabled by default, using the default JVM certificates to secure communication.

x

Response Timeout

Number

Amount of time to wait for the operation to execute before throwing an error. This value is qualified by the Response Timeout TimeUnit.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout value

SECONDS

Minimum Retry Backoff

Number

The minimum backoff interval for the retry

0

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Minimum Retry Backoff value

SECONDS

Maximum Retry Backoff

Number

The maximum backoff interval for the retry

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Maximum Retry Backoff value

SECONDS

Retries

Number

The maximum amount of retries that the connector will attempt

10

Increased wait on server busy

Number

Ammount of additional time to wait whenever there’s a ServerBusyException

0

Increased wait on server busy Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

##### Azure Active Directory The Azure Active Directory (Azure AD) connection type provides role-based access control (RBAC), in which users can use [Azure AD app registrations](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application) to generate a **Client Id** and a **Client Secret** for authentication. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

Namespace that contains resources to which the connector establishes a connection.

x

Azure endpoint

String

Constructs the complete URL that the connector uses to establish a connection.

servicebus.windows.net

Tenant Id

String

Tenant in which the app registration and the Azure Service Bus instance are running.

x

Client Id

String

ID of the app registration.

x

Client Secret

String

Secret key of the app registration.

x

Security

TLS

TLS enabled by default, using the default JVM certificates to secure communication.

x

Response Timeout

Number

How long to wait for an operation to execute before throwing an error.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

SECONDS

Minimum Retry Backoff

Number

Minimum backoff interval for the retry.

0

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Minimum Retry Backoff field.

SECONDS

Maximum Retry Backoff

Number

Maximum backoff interval for the retry.

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Maximum Retry Backoff field.

SECONDS

Retries

Number

Maximum number of retries that the connector attempts.

10

Increased wait on server busy

Number

Ammount of additional time to wait whenever there’s a ServerBusyException

0

Increased wait on server busy Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

## List of Operations - [Abandon](#abandonMessage) - [Complete](#completeMessage) - [Receive](#receive) - [Receive Batch](#receiveBatch) - [Send](#send) - [Send batch of messages](#sendMessageBatch) ## List of Sources - [Message Listener](#message-listener) ## Operations ### Abandon `` Abandon message stored in the current receiver (This is equivalent to a NACK operation). This operation can be used only from inside a flow that also includes a **Message Listener Source** operation. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Lock Token

String

Lock Token from the message to abandon. This represents a UUID for a message.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:ANY ### Complete `` This operation completes a message received from within a flow with a Message Listener operation in the current source. This is the same as an acknowledge. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Lock Token

String

Lock Token from the message to ACK. This represents a UUID for a message.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_EXPIRED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:ANY - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_NOT\_FOUND ### Receive `` This operation receives a message from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Target Variable

String

Name of a variable in which to store the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Receive Batch `` This operation attempts to receive up to maxMessageCount messages from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. Due to the design of the Azure-provided SDK that Azure Service Bus Connector uses, the actual number of messages received may be fewer or more than the maxMessageCount specified. This behavior occurs because the Azure-provided SDK treats maxMessageCount as an approximation rather than a strict limit. Additionally, a null value may be returned if the operation exceeds the specified timeout or if there are no more messages to receive. > [!IMPORTANT] To ensure that all available messages are received, you might need to call this > operation multiple times. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Max Message Count

Number

Maximum number of messages that can be received

x

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Target Variable

String

Name of a variable in which to store the operation’s output

Target Value

String

An expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

#### Output

Type

Array of Message of [Binary] payload and [Attributes Without Lock Token] attributes

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send `` This operation sends a message to a Queue or Topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Body

Binary

Body of this message

#[payload]

Message Id

String

Message identifier is an application-defined value that uniquely identifies the message and its payload

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Lists the possible strategies to determine the correlation ID to send on an outbound operation that supports correlation

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Session Id

String

Session identifier for a session-aware entity

Reply To

String

Name of the destination to which to send the message reply

Reply To Session Id

String

The ID of the Session associated with the message.

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

Relative duration, in milliseconds, after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Write Concern Timeout

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and therefore made available for retrieval

Properties

Object

Map of user application properties set on the message

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send batch of messages `` This operation sends a list of messages to a queue or topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Messages

Array of Any

Messages to send

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:ANY - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS ## Sources ### Message Listener `` This operation receives messages from a specific queue or subscription. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Acknowledgment mode

Enumeration, one of:

  • AUTO

  • MANUAL

  • IMMEDIATE

Specifies the way to acknowledge received messages. AUTO and MANUAL uses the PeekLock mode. IMMEDIATE uses the ReceiveAndDelete mode.

x

Prefetch Count

Number

When Prefetch is enabled, the receiver quietly acquires more messages, up to the PrefetchCount limit, beyond what the application initially requested. Setting this value to zero (0) disables prefetching.

0

Number Of Consumers

Number

Number of concurrent consumers to use to receive messages

Buffered Mode

Boolean

Buffered is the default mode. Consumers send the message to the flow and immediately receive the next message. If Buffered Mode is disabled, the consumers do not receive the next message until the current message exits the flow.

true

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Primary Node Only

Boolean

Whether this source should be executed only on the primary node when running in a cluster

true

Redelivery Policy

Defines a policy for processing the redelivery of the same message

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Reconnection Strategy

Retry strategy in case of connectivity errors

Body

Binary

Body of the message

#[payload]

Message Id

String

The message identifier is an application-defined value that uniquely identifies the message and its payload.

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

AUTO

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Session Id

String

Session identifier for a session-aware entity

Reply To

String

Standard way to express a reply path to the receiver of the message

Reply To Session Id

String

Session identifier for a session-aware entity

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

This value is the relative duration after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Write Concern Timeout

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and made available for retrieval

Properties

Object

Map of user application properties set on the message

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) ## Types ### Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Count

Number

How many reconnection attempts to make

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance is allowed to be idle before it’s considered eligible for expiration

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

### Azure Message Attributes
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

DateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

DateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Lock Token

String

Read-only property that references the lock that is in peek-lock receive mode

Locked Until Utc

DateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

DateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Any

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times a message can be redelivered and processed unsuccessfully before triggering a process-failed-message

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

Secure hashing algorithm to use. If not set, the default is SHA-256.

SHA-256

Id Expression

String

Defines one or more expressions to use to determine when a message is redelivered. This property can be set only if useSecureHash is false.

Object Store

Object Store

Object store where the redelivery counter for each message is stored

### Attributes Without Lock Token
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

DateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

DateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Locked Until Utc

DateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

DateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Any

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.4 --- # Azure Service Bus Connector 3.4 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you install the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ http://www.mulesoft.org/schema/mule//current/mule-.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-azure-service-bus-connector x.x.x mule-plugin ``` Verify that the `` corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `azure service bus`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try [the examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.5 --- # Azure Service Bus Connector 3.5 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) makes it easy to build integrations that send messages to and receive messages from Azure Service Bus, which is an asynchronous messaging cloud platform. This connector supports communication with queues and topics and can perform actions such as: - Send to queue - Send to topic - Receive from queue - Receive from subscription To use the Azure management API for CRUD operations of queues, topics, subscriptions, and rules, use Anypoint Connector for Azure Service Bus Management (Azure Service Bus Management Connector). > [!NOTE] This connector supports integrations with Azure Service Bus (cloud). It does not work with > Microsoft Service Bus (on-premises). To connect with Microsoft Service Bus on-premises, use > Anypoint Connector for Microsoft Service Bus. > > This connector does not work with Event Hubs. For compatibility information and fixed issues, see the release notes. ## Before You Begin To use this connector, you must be familiar with: - The Azure Service Bus APIs - Anypoint connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio Before creating an app, you must have: - Access to the Azure target resource - Anypoint Studio or Anypoint Code Builder ## Audience - New user To create your Mule app, see: - [Studio Configuration](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-studio) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-examples), which provides one or more use cases for the connector. - Advanced user - Read the following: - [XML and Maven Support](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-xml-maven) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-examples) topics ## Authentication Types Azure Service Bus Connector supports the following connection types to connect to Azure: - Shared Access Signature (SAS) - Azure Active Directory (AAD) For information about configuring these authentication types, see [Using Anypoint Studio to Configure Azure Service Bus Connector](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-studio). ## Next Step After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Azure Service Bus Management Connector](https://docs.mulesoft.com/azure-service-bus-management-connector/latest/) - [Azure Service Bus Connector on Exchange](https://anypoint.mulesoft.com/exchange/com.mulesoft.connectors/mule-azure-service-bus-connector/) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.5 --- # Azure Service Bus Connector 3.5 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The examples in this section show application flows that: - [Sends messages to and receives messages](#send-receive) from Azure Service Bus - [Sends and listens](#send-listen-ack) for messages and receives an acknowledgment using the `MANUAL` acknowledgment type - [Sends and receives batch messages](#batch-send-receive) - [Sends and receives messages using session IDs for session-aware queues](#send-receive-session-ids) - [Using Azure Active Directory connector provider](#using-aad-connector) These examples use variables for some field values. You can either: - Replace the variables with their values in the code - Provide the values for each variable in a properties file and then refer to that file from the connector configuration For more information about using a properties file, see [Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure) ## Create a Mule Project After you create a new Mule project and configure your credentials, you can create an application flow for each example by using the provided XML code. To create a Mule project: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. 3. Create a file named `mule-app.properties` and save it in `/src/main/resources`. 4. Configure your Azure connection credentials in the file `mule-app.properties`, and include the name of the Azure queue you created, for example: #============================================================== #Connection Parameters #============================================================== # Azure common authentication configuration azure.namespace=myazure queue.name=mytestqueue # Shared Access Signature authentication azure.keyname=SAStokenname azure.key=SAStoken # Azure Active Directory authentication azure.tenantId=TenantId azure.clientId=ClientId azure.clientSecret=ClientSecret 5. Save the file. 6. Open the **Global Element Configuration** and click **Test Connection** to verify your credentials. ## Send and Receive Example This flow shows an example of how to use the **Send** and **Receive From Queue** operations to send and receive messages: ![Example Azure Service Bus flow that uses the Send and Receive From Queue operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-send-receive.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Batch Send and Receive Example This application flow uses the **Send batch** and **Receive Batch** operations to send and receive batches of messages to and from an Azure Service Bus queue. The following screenshot shows the application flow for sending and receiving batch messages: ![Application flow that shows sending and receiving batch messages](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-send-receive-batch.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. Save the project. 5. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send, Listen, and Acknowledge the Message Example This application flow uses the **Send** and **Message Listener** operations. The **Message Listener** is using the `MANUAL` acknowledgment type, which means that the application logic is responsible for acknowledging receipt of the message. In this example, that logic is provided by adding the **Complete** operation to the same flow as the **Message Listener**. The following screenshot shows this flow: ![Application flow that shows how the Send, Message Listener, and Complete operations are used](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-send-listen-manual-ack.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send and Receive Messages Using Session IDs for Session-Aware Queues Example This application flow uses the **Send** operation and **Message Listener** source. The flow is configured to use session IDs for session-aware queues. ![Four flows that have Scheduler, Set Payload, and Send operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-session-id-1.png) ![Flow that has first Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-session-id-2.png) ![Flow that has second Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-session-id-3.png) ![Flow that has third Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-session-id-4.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Using Azure Active Directory Connector Provider Some organizations use Azure Active Directory to authenticate their instances. Any of the previous examples can be modified to support this scenario. Replace the Shared Access Signature authentication with the Azure Active Directory authentication: ```xml ``` ```xml ``` Ensure that: - Your `mule-app.properties` file contains the **Tenant Id**, **Client Id**, and **Client Secret** fields. - Your app registration contains the proper [permissions and roles](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application). ## See Also - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.5 --- # Azure Service Bus Connector 3.5 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) enables message integration with Azure Service Bus on the cloud. --- ## Configurations ### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Whether to specify a correlation ID when publishing messages. This applies both for custom correlation IDs specified at the operation level and for default correlation IDs taken from the current event.

AUTO

Zone Id

String

Zone ID property is used to identify the rules used to convert between an Instant and LocalDateTime. If the Zone ID equals Z, UTC is used. If the Zone ID is not specified, the system default Zone ID is used.

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

#### Connection Types ##### Shared Access Signature The SAS connection type uses the SAS Key Name and the SAS Key to generate a token, which is used by the Azure Service Bus SDK to establish the connection to the Service Bus instance. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

The namespace contains the resources to which the connector can establish a connection.

x

Shared access key name

String

Name of the Shared Access key

x

Shared access key

String

Shared Access key

x

Security

TLS

TLS enabled by default, using the default JVM certificates to secure communication.

x

Response Timeout

Number

Amount of time to wait for the operation to execute before throwing an error. This value is qualified by the Response Timeout TimeUnit.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout value

SECONDS

Minimum Retry Backoff

Number

The minimum backoff interval for the retry

0

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Minimum Retry Backoff value

SECONDS

Maximum Retry Backoff

Number

The maximum backoff interval for the retry

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Maximum Retry Backoff value

SECONDS

Retries

Number

The maximum amount of retries that the connector will attempt

10

Increased wait on server busy

Number

Ammount of additional time to wait whenever there’s a ServerBusyException

0

Increased wait on server busy Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

##### Azure Active Directory The Azure Active Directory (Azure AD) connection type provides role-based access control (RBAC), in which users can use [Azure AD app registrations](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application) to generate a **Client Id** and a **Client Secret** for authentication. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

Namespace that contains resources to which the connector establishes a connection.

x

Azure endpoint

String

Constructs the complete URL that the connector uses to establish a connection.

servicebus.windows.net

Tenant Id

String

Tenant in which the app registration and the Azure Service Bus instance are running.

x

Client Id

String

ID of the app registration.

x

Client Secret

String

Secret key of the app registration.

x

Security

TLS

TLS enabled by default, using the default JVM certificates to secure communication.

x

Response Timeout

Number

How long to wait for an operation to execute before throwing an error.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

SECONDS

Minimum Retry Backoff

Number

Minimum backoff interval for the retry.

0

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Minimum Retry Backoff field.

SECONDS

Maximum Retry Backoff

Number

Maximum backoff interval for the retry.

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Maximum Retry Backoff field.

SECONDS

Retries

Number

Maximum number of retries that the connector attempts.

10

Increased wait on server busy

Number

Ammount of additional time to wait whenever there’s a ServerBusyException

0

Increased wait on server busy Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

## List of Operations - [Abandon](#abandonMessage) - [Complete](#completeMessage) - [Receive](#receive) - [Receive Batch](#receiveBatch) - [Send](#send) - [Send batch of messages](#sendMessageBatch) ## List of Sources - [Message Listener](#message-listener) ## Operations ### Abandon `` Abandon message stored in the current receiver (This is equivalent to a NACK operation). This operation can be used only from inside a flow that also includes a **Message Listener Source** operation. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Lock Token

String

Lock Token from the message to abandon. This represents a UUID for a message.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:ANY ### Complete `` This operation completes a message received from within a flow with a Message Listener operation in the current source. This is the same as an acknowledge. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Lock Token

String

Lock Token from the message to ACK. This represents a UUID for a message.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_EXPIRED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:ANY - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_NOT\_FOUND ### Receive `` This operation receives a message from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Target Variable

String

Name of a variable in which to store the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Receive Batch `` This operation attempts to receive up to maxMessageCount messages from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. Due to the design of the Azure-provided SDK that Azure Service Bus Connector uses, the actual number of messages received may be fewer or more than the maxMessageCount specified. This behavior occurs because the Azure-provided SDK treats maxMessageCount as an approximation rather than a strict limit. Additionally, a null value may be returned if the operation exceeds the specified timeout or if there are no more messages to receive. > [!IMPORTANT] To ensure that all available messages are received, you might need to call this > operation multiple times. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Max Message Count

Number

Maximum number of messages that can be received

x

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Target Variable

String

Name of a variable in which to store the operation’s output

Target Value

String

An expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

#### Output

Type

Array of Message of [Binary] payload and [Attributes Without Lock Token] attributes

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send `` This operation sends a message to a Queue or Topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Body

Binary

Body of this message

#[payload]

Message Id

String

Message identifier is an application-defined value that uniquely identifies the message and its payload

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Lists the possible strategies to determine the correlation ID to send on an outbound operation that supports correlation

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Message Session Id

String

Session identifier for a session-aware entity

Reply To

String

Name of the destination to which to send the message reply

Reply To Session Id

String

The ID of the Session associated with the message.

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

Relative duration, in milliseconds, after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Write Concern Timeout

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and therefore made available for retrieval

Properties

Object

Map of user application properties set on the message

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send batch of messages `` This operation sends a list of messages to a queue or topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Messages

Array of Any

Messages to send

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:ANY - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS ## Sources ### Message Listener `` This operation receives messages from a specific queue or subscription. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Message Session Id

String

Message session ID.

Acknowledgment mode

Enumeration, one of:

  • AUTO

  • MANUAL

  • IMMEDIATE

Specifies the way to acknowledge received messages. AUTO and MANUAL uses the PeekLock mode. IMMEDIATE uses the ReceiveAndDelete mode.

x

Prefetch Count

Number

When Prefetch is enabled, the receiver quietly acquires more messages, up to the PrefetchCount limit, beyond what the application initially requested. Setting this value to zero (0) disables prefetching.

0

Number Of Consumers

Number

Number of concurrent consumers to use to receive messages

Buffered Mode

Boolean

Buffered is the default mode. Consumers send the message to the flow and immediately receive the next message. If Buffered Mode is disabled, the consumers do not receive the next message until the current message exits the flow.

true

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Primary Node Only

Boolean

Whether this source should be executed only on the primary node when running in a cluster

true

Redelivery Policy

Defines a policy for processing the redelivery of the same message

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Reconnection Strategy

Retry strategy in case of connectivity errors

Body

Binary

Body of the message

#[payload]

Message Id

String

The message identifier is an application-defined value that uniquely identifies the message and its payload.

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

AUTO

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Session Id

String

Session identifier for a session-aware entity

Reply To

String

Standard way to express a reply path to the receiver of the message

Reply To Session Id

String

Session identifier for a session-aware entity

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

This value is the relative duration after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Write Concern Timeout

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and made available for retrieval

Properties

Object

Map of user application properties set on the message

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) ## Types ### Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Count

Number

How many reconnection attempts to make

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance is allowed to be idle before it’s considered eligible for expiration

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

### Azure Message Attributes
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

DateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

DateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Lock Token

String

Read-only property that references the lock that is in peek-lock receive mode

Locked Until Utc

DateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

DateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Any

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times a message can be redelivered and processed unsuccessfully before triggering a process-failed-message

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

Secure hashing algorithm to use. If not set, the default is SHA-256.

SHA-256

Id Expression

String

Defines one or more expressions to use to determine when a message is redelivered. This property can be set only if useSecureHash is false.

Object Store

Object Store

Object store where the redelivery counter for each message is stored

### Attributes Without Lock Token
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

DateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

DateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Locked Until Utc

DateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

DateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Any

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.5 --- # Azure Service Bus Connector 3.5 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you install the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ http://www.mulesoft.org/schema/mule//current/mule-.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-azure-service-bus-connector x.x.x mule-plugin ``` Verify that the `` corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `azure service bus`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try [the examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.6 --- # Azure Service Bus Connector 3.6 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) makes it easy to build integrations that send messages to and receive messages from Azure Service Bus, which is an asynchronous messaging cloud platform. This connector supports communication with queues and topics and can perform actions such as: - Send to queue - Send to topic - Receive from queue - Receive from subscription To use the Azure management API for CRUD operations of queues, topics, subscriptions, and rules, use Anypoint Connector for Azure Service Bus Management (Azure Service Bus Management Connector). > [!NOTE] This connector supports integrations with Azure Service Bus (cloud). It does not work with > Microsoft Service Bus (on-premises). To connect with Microsoft Service Bus on-premises, use > Anypoint Connector for Microsoft Service Bus. > > This connector does not work with Event Hubs. For compatibility information and fixed issues, see the release notes. ## Before You Begin To use this connector, you must be familiar with: - The Azure Service Bus APIs - Anypoint connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio ## Audience - New user To create your Mule app, see: - [Studio Configuration](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-studio) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-examples), which provides one or more use cases for the connector. - Advanced user - Read the following: - [XML and Maven Support](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-xml-maven) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-examples) topics ## Authentication Types Azure Service Bus Connector supports the following connection types to connect to Azure: - Shared Access Signature (SAS) - Azure Active Directory (AAD) For information about configuring these authentication types, see [Using Anypoint Studio to Configure Azure Service Bus Connector](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-studio). ## Next Step After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Azure Service Bus Management Connector](https://docs.mulesoft.com/azure-service-bus-management-connector/latest/) - [Azure Service Bus Connector on Exchange](https://anypoint.mulesoft.com/exchange/com.mulesoft.connectors/mule-azure-service-bus-connector/) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.6 --- # Azure Service Bus Connector 3.6 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The examples in this section show application flows that: - [Sends messages to and receives messages](#send-receive) from Azure Service Bus - [Sends and listens](#send-listen-ack) for messages and receives an acknowledgment using the `MANUAL` acknowledgment type - [Sends and receives batch messages](#batch-send-receive) - [Sends and receives messages using session IDs for session-aware queues](#send-receive-session-ids) - [Using Azure Active Directory connector provider](#using-aad-connector) These examples use variables for some field values. You can either: - Replace the variables with their values in the code - Provide the values for each variable in a properties file and then refer to that file from the connector configuration For more information about using a properties file, see [Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure) ## Create a Mule Project After you create a new Mule project and configure your credentials, you can create an application flow for each example by using the provided XML code. To create a Mule project: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. 3. Create a file named `mule-app.properties` and save it in `/src/main/resources`. 4. Configure your Azure connection credentials in the file `mule-app.properties`, and include the name of the Azure queue you created, for example: #============================================================== #Connection Parameters #============================================================== # Azure common authentication configuration azure.namespace=myazure queue.name=mytestqueue # Shared Access Signature authentication azure.keyname=SAStokenname azure.key=SAStoken # Azure Active Directory authentication azure.tenantId=TenantId azure.clientId=ClientId azure.clientSecret=ClientSecret 5. Save the file. 6. Open the **Global Element Configuration** and click **Test Connection** to verify your credentials. ## Send and Receive Example This flow shows an example of how to use the **Send** and **Receive From Queue** operations to send and receive messages: ![Example Azure Service Bus flow that uses the Send and Receive From Queue operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-send-receive.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Batch Send and Receive Example This application flow uses the **Send batch** and **Receive Batch** operations to send and receive batches of messages to and from an Azure Service Bus queue. The following screenshot shows the application flow for sending and receiving batch messages: ![Application flow that shows sending and receiving batch messages](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-send-receive-batch.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. Save the project. 5. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send, Listen, and Acknowledge the Message Example This application flow uses the **Send** and **Message Listener** operations. The **Message Listener** is using the `MANUAL` acknowledgment type, which means that the application logic is responsible for acknowledging receipt of the message. In this example, that logic is provided by adding the **Complete** operation to the same flow as the **Message Listener**. The following screenshot shows this flow: ![Application flow that shows how the Send, Message Listener, and Complete operations are used](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-send-listen-manual-ack.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send and Receive Messages Using Session IDs for Session-Aware Queues Example This application flow uses the **Send** operation and **Message Listener** source. The flow is configured to use session IDs for session-aware queues. ![Four flows that have Scheduler, Set Payload, and Send operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-session-id-1.png) ![Flow that has first Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-session-id-2.png) ![Flow that has second Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-session-id-3.png) ![Flow that has third Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-session-id-4.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Using Azure Active Directory Connector Provider Some organizations use Azure Active Directory to authenticate their instances. Any of the previous examples can be modified to support this scenario. Replace the Shared Access Signature authentication with the Azure Active Directory authentication: ```xml ``` ```xml ``` Ensure that: - Your `mule-app.properties` file contains the **Tenant Id**, **Client Id**, and **Client Secret** fields. - Your app registration contains the proper [permissions and roles](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application). ## See Also - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.6 --- # Azure Service Bus Connector 3.6 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) enables message integration with Azure Service Bus on the cloud. --- ## Configurations ### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Whether to specify a correlation ID when publishing messages. This applies both for custom correlation IDs specified at the operation level and for default correlation IDs taken from the current event.

AUTO

Zone Id

String

Zone ID property is used to identify the rules used to convert between an Instant and LocalDateTime. If the Zone ID equals Z, UTC is used. If the Zone ID is not specified, the system default Zone ID is used.

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances as appropriate.

#### Connection Types ##### Shared Access Signature The SAS connection type uses the SAS Key Name and the SAS Key to generate a token, which is used by the Azure Service Bus SDK to establish the connection to the Service Bus instance. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

The namespace contains the resources to which the connector can establish a connection.

x

Shared access key name

String

Name of the Shared Access key

x

Shared access key

String

Shared Access key

x

Security

TLS

TLS enabled by default, using the default JVM certificates to secure communication.

x

Response Timeout

Number

Amount of time to wait for the operation to execute before throwing an error. This value is qualified by the Response Timeout TimeUnit.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout value

SECONDS

Minimum Retry Backoff

Number

The minimum backoff interval for the retry. This must be a positive integer and setting it to zero results in ineffective retry behavior.

1

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Minimum Retry Backoff value

SECONDS

Maximum Retry Backoff

Number

The maximum backoff interval for the retry

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Maximum Retry Backoff value

SECONDS

Retries

Number

The maximum amount of retries that the connector will attempt

10

Increased Wait On Server Busy (Deprecated)

Number

Amount of additional time to wait whenever there’s a ServerBusyException

0

Increased Wait On Server Busy Time Unit (Deprecated)

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

##### Azure Active Directory The Azure Active Directory (Azure AD) connection type provides role-based access control (RBAC), in which users can use [Azure AD app registrations](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application) to generate a **Client Id** and a **Client Secret** for authentication. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

Namespace that contains resources to which the connector establishes a connection.

x

Azure endpoint

String

Constructs the complete URL that the connector uses to establish a connection.

servicebus.windows.net

Tenant Id

String

Tenant in which the app registration and the Azure Service Bus instance are running.

x

Client Id

String

ID of the app registration.

x

Client Secret

String

Secret key of the app registration.

x

Security

TLS

TLS enabled by default, using the default JVM certificates to secure communication.

x

Response Timeout

Number

How long to wait for an operation to execute before throwing an error.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

SECONDS

Minimum Retry Backoff

Number

Minimum backoff interval for the retry. This must be a positive integer and setting it to zero results in ineffective retry behavior.

1

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Minimum Retry Backoff field.

SECONDS

Maximum Retry Backoff

Number

Maximum backoff interval for the retry.

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Maximum Retry Backoff field.

SECONDS

Retries

Number

Maximum number of retries that the connector attempts.

10

Increased Wait On Server Busy (Deprecated)

Number

Amount of additional time to wait whenever there’s a ServerBusyException

0

Increased Wait On Server Busy Time Unit (Deprecated)

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

Reconnection

Configures a reconnection strategy to use when a connector operation fails to connect to an external server.

## List of Operations - [Abandon](#abandonMessage) - [Complete](#completeMessage) - [Receive](#receive) - [Receive Batch](#receiveBatch) - [Send](#send) - [Send batch of messages](#sendMessageBatch) ## List of Sources - [Message Listener](#message-listener) ## Operations ### Abandon `` Abandon message stored in the current receiver (This is equivalent to a NACK operation). This operation can be used only from inside a flow that also includes a **Message Listener Source** operation. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Lock Token

String

Lock Token from the message to abandon. This represents a UUID for a message.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:ANY ### Complete `` This operation completes a message received from within a flow with a Message Listener operation in the current source. This is the same as an acknowledge. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Lock Token

String

Lock Token from the message to ACK. This represents a UUID for a message.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_EXPIRED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:ANY - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_NOT\_FOUND ### Receive `` This operation receives a message from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Target Variable

String

Name of a variable in which to store the operation’s output

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Receive Batch `` This operation attempts to receive up to maxMessageCount messages from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. Due to the design of the Azure-provided SDK that Azure Service Bus Connector uses, the actual number of messages received may be fewer or more than the maxMessageCount specified. This behavior occurs because the Azure-provided SDK treats maxMessageCount as an approximation rather than a strict limit. Additionally, a null value may be returned if the operation exceeds the specified timeout or if there are no more messages to receive. > [!IMPORTANT] To ensure that all available messages are received, you might need to call this > operation multiple times. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Max Message Count

Number

Maximum number of messages that can be received

x

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Target Variable

String

Name of a variable in which to store the operation’s output

Target Value

String

An expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

#### Output

Type

Array of Message of [Binary] payload and [Attributes Without Lock Token] attributes

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send `` This operation sends a message to a Queue or Topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Body

Binary

Body of this message

#[payload]

Message Id

String

Message identifier is an application-defined value that uniquely identifies the message and its payload

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Lists the possible strategies to determine the correlation ID to send on an outbound operation that supports correlation

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Message Session Id

String

Session identifier for a session-aware entity

Reply To

String

Name of the destination to which to send the message reply

Reply To Session Id

String

The ID of the Session associated with the message.

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

Relative duration, in milliseconds, after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Write Concern Timeout

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and therefore made available for retrieval

Properties

Object

Map of user application properties set on the message

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send batch of messages `` This operation sends a list of messages to a queue or topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Messages

Array of Any

Messages to send

#[payload]

Reconnection Strategy

A retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:ANY - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS ## Sources ### Message Listener `` This operation receives messages from a specific queue or subscription. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Message Session Id

String

Message session ID.

Acknowledgment mode

Enumeration, one of:

  • AUTO

  • MANUAL

  • IMMEDIATE

Specifies the way to acknowledge received messages. AUTO and MANUAL uses the PeekLock mode. IMMEDIATE uses the ReceiveAndDelete mode.

x

Prefetch Count

Number

When Prefetch is enabled, the receiver quietly acquires more messages, up to the PrefetchCount limit, beyond what the application initially requested. Setting this value to zero (0) disables prefetching.

0

Number Of Consumers

Number

Number of concurrent consumers to use to receive messages

Buffered Mode

Boolean

Buffered is the default mode. Consumers send the message to the flow and immediately receive the next message. If Buffered Mode is disabled, the consumers do not receive the next message until the current message exits the flow.

true

Enable Auto Lock Renewal

Boolean

Specifies whether the source should automatically renew message locks for session-aware queues, which prevents lock expiration during long-running message processing. The message lock renewal duration defaults to 5 minutes (hardcoded per Azure SDK). Flows exceeding 5 minutes of processing time experience lock expiration.

true

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Primary Node Only

Boolean

Whether this source should be executed only on the primary node when running in a cluster

true

Redelivery Policy

Defines a policy for processing the redelivery of the same message

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Reconnection Strategy

Retry strategy in case of connectivity errors

Body

Binary

Body of the message

#[payload]

Message Id

String

The message identifier is an application-defined value that uniquely identifies the message and its payload.

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

AUTO

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Session Id

String

Session identifier for a session-aware entity

Reply To

String

Standard way to express a reply path to the receiver of the message

Reply To Session Id

String

Session identifier for a session-aware entity

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

This value is the relative duration after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Write Concern Timeout

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and made available for retrieval

Properties

Object

Map of user application properties set on the message

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) ## Types ### Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Count

Number

How many reconnection attempts to make

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance is allowed to be idle before it’s considered eligible for expiration

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

### Azure Message Attributes
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

DateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

DateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Lock Token

String

Read-only property that references the lock that is in peek-lock receive mode

Locked Until Utc

DateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

DateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Any

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times a message can be redelivered and processed unsuccessfully before triggering a process-failed-message

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

Secure hashing algorithm to use. If not set, the default is SHA-256.

SHA-256

Id Expression

String

Defines one or more expressions to use to determine when a message is redelivered. This property can be set only if useSecureHash is false.

Object Store

Object Store

Object store where the redelivery counter for each message is stored

### Attributes Without Lock Token
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

DateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

DateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Locked Until Utc

DateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

DateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Any

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.6 --- # Azure Service Bus Connector 3.6 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you install the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ http://www.mulesoft.org/schema/mule//current/mule-.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-azure-service-bus-connector x.x.x mule-plugin ``` Verify that the `` corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `azure service bus`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try [the examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.7 --- # Azure Service Bus Connector 3.7 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) makes it easy to build integrations that send messages to and receive messages from Azure Service Bus, which is an asynchronous messaging cloud platform. This connector supports communication with queues and topics and can perform actions such as: - Send to queue - Send to topic - Receive from queue - Receive from subscription To use the Azure management API for CRUD operations of queues, topics, subscriptions, and rules, use Anypoint Connector for Azure Service Bus Management (Azure Service Bus Management Connector). > [!NOTE] This connector supports integrations with Azure Service Bus (cloud). It does not work with > Microsoft Service Bus (on-premises). To connect with Microsoft Service Bus on-premises, use > Anypoint Connector for Microsoft Service Bus. > > This connector does not work with Event Hubs. For compatibility information and fixed issues, see the release notes. ## Before You Begin To use this connector, you must be familiar with: - The Azure Service Bus APIs - Anypoint connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio ## Audience - New user To create your Mule app, see: - [Studio Configuration](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-studio) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-examples), which provides one or more use cases for the connector. - Advanced user - Read the following: - [XML and Maven Support](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-xml-maven) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-examples) topics ## Authentication Types Azure Service Bus Connector supports the following connection types to connect to Azure: - Shared Access Signature (SAS) - Azure Active Directory (AAD) For information about configuring these authentication types, see [Using Anypoint Studio to Configure Azure Service Bus Connector](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-studio). ## Next Step After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Azure Service Bus Management Connector](https://docs.mulesoft.com/azure-service-bus-management-connector/latest/) - [Azure Service Bus Connector on Exchange](https://anypoint.mulesoft.com/exchange/com.mulesoft.connectors/mule-azure-service-bus-connector/) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.7 --- # Azure Service Bus Connector 3.7 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The examples in this section show application flows that: - [Sends messages to and receives messages](#send-receive) from Azure Service Bus - [Sends and listens](#send-listen-ack) for messages and receives an acknowledgment using the `MANUAL` acknowledgment type - [Sends and receives batch messages](#batch-send-receive) - [Sends and receives messages using session IDs for session-aware queues](#send-receive-session-ids) - [Using Azure Active Directory connector provider](#using-aad-connector) These examples use variables for some field values. You can either: - Replace the variables with their values in the code - Provide the values for each variable in a properties file and then refer to that file from the connector configuration For more information about using a properties file, see [Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure) ## Create a Mule Project After you create a new Mule project and configure your credentials, you can create an application flow for each example by using the provided XML code. To create a Mule project: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. 3. Create a file named `mule-app.properties` and save it in `/src/main/resources`. 4. Configure your Azure connection credentials in the file `mule-app.properties`, and include the name of the Azure queue you created, for example: #============================================================== #Connection Parameters #============================================================== # Azure common authentication configuration azure.namespace=myazure queue.name=mytestqueue # Shared Access Signature authentication azure.keyname=SAStokenname azure.key=SAStoken # Azure Active Directory authentication azure.tenantId=TenantId azure.clientId=ClientId azure.clientSecret=ClientSecret 5. Save the file. 6. Open the **Global Element Configuration** and click **Test Connection** to verify your credentials. ## Send and Receive Example This flow shows an example of how to use the **Send** and **Receive From Queue** operations to send and receive messages: ![Example Azure Service Bus flow that uses the Send and Receive From Queue operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-send-receive.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Batch Send and Receive Example This application flow uses the **Send batch** and **Receive Batch** operations to send and receive batches of messages to and from an Azure Service Bus queue. The following screenshot shows the application flow for sending and receiving batch messages: ![Application flow that shows sending and receiving batch messages](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-send-receive-batch.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. Save the project. 5. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send, Listen, and Acknowledge the Message Example This application flow uses the **Send** and **Message Listener** operations. The **Message Listener** is using the `MANUAL` acknowledgment type, which means that the application logic is responsible for acknowledging receipt of the message. In this example, that logic is provided by adding the **Complete** operation to the same flow as the **Message Listener**. The following screenshot shows this flow: ![Application flow that shows how the Send, Message Listener, and Complete operations are used](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-send-listen-manual-ack.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send and Receive Messages Using Session IDs for Session-Aware Queues Example This application flow uses the **Send** operation and **Message Listener** source. The flow is configured to use session IDs for session-aware queues. ![Four flows that have Scheduler, Set Payload, and Send operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-session-id-1.png) ![Flow that has first Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-session-id-2.png) ![Flow that has second Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-session-id-3.png) ![Flow that has third Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-session-id-4.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Using Azure Active Directory Connector Provider Some organizations use Azure Active Directory to authenticate their instances. Any of the previous examples can be modified to support this scenario. Replace the Shared Access Signature authentication with the Azure Active Directory authentication: ```xml ``` ```xml ``` Ensure that: - Your `mule-app.properties` file contains the **Tenant Id**, **Client Id**, and **Client Secret** fields. - Your app registration contains the proper [permissions and roles](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application). ## See Also - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.7 --- # Azure Service Bus Connector 3.7 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) enables message integration with Azure Service Bus on the cloud. --- ## Configurations ### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Whether to specify a correlation ID when publishing messages. This applies both for custom correlation IDs specified at the operation level and for default correlation IDs taken from the current event.

AUTO

Zone Id

String

Zone ID property is used to identify the rules used to convert between an Instant and LocalDateTime. If the Zone ID equals Z, UTC is used. If the Zone ID is not specified, the system default Zone ID is used.

#### Connection Types ##### Shared Access Signature The SAS connection type uses the SAS Key Name and the SAS Key to generate a token, which is used by the Azure Service Bus SDK to establish the connection to the Service Bus instance. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

The namespace contains the resources to which the connector can establish a connection.

x

Shared access key name

String

Name of the Shared Access key

x

Shared access key

String

Shared Access key

x

Response Timeout

Number

Amount of time to wait for the operation to execute before throwing an error. This value is qualified by the Response Timeout TimeUnit.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout value

SECONDS

Minimum Retry Backoff

Number

The minimum backoff interval for the retry. This must be a positive integer and setting it to zero results in ineffective retry behavior.

1

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Minimum Retry Backoff value

SECONDS

Maximum Retry Backoff

Number

The maximum backoff interval for the retry

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Maximum Retry Backoff value

SECONDS

Retries

Number

The maximum amount of retries that the connector will attempt

10

Increased Wait On Server Busy (Deprecated)

Number

Amount of additional time to wait whenever there’s a ServerBusyException

0

Increased Wait On Server Busy Time Unit (Deprecated)

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

##### Azure Active Directory The Azure Active Directory (Azure AD) connection type provides role-based access control (RBAC), in which users can use [Azure AD app registrations](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application) to generate a **Client Id** and a **Client Secret** for authentication. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

Namespace that contains resources to which the connector establishes a connection.

x

Azure endpoint

String

Constructs the complete URL that the connector uses to establish a connection.

servicebus.windows.net

Tenant Id

String

Tenant in which the app registration and the Azure Service Bus instance are running.

x

Client Id

String

ID of the app registration.

x

Client Secret

String

Secret key of the app registration.

x

Response Timeout

Number

How long to wait for an operation to execute before throwing an error.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

SECONDS

Minimum Retry Backoff

Number

Minimum backoff interval for the retry. This must be a positive integer and setting it to zero results in ineffective retry behavior.

1

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Minimum Retry Backoff field.

SECONDS

Maximum Retry Backoff

Number

Maximum backoff interval for the retry.

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Maximum Retry Backoff field.

SECONDS

Retries

Number

Maximum number of retries that the connector attempts.

10

Increased Wait On Server Busy (Deprecated)

Number

Amount of additional time to wait whenever there’s a ServerBusyException

0

Increased Wait On Server Busy Time Unit (Deprecated)

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

## List of Operations - [Abandon](#abandonMessage) - [Complete](#completeMessage) - [Dead Letter](#deadLetterMessage) - [Receive](#receive) - [Receive Batch](#receiveBatch) - [Send](#send) - [Send batch of messages](#sendMessageBatch) ## List of Sources - [Message Listener](#message-listener) ## Operations ### Abandon `` Abandon message stored in the current receiver (This is equivalent to a NACK operation). This operation can be used only from inside a flow that also includes a **Message Listener Source** operation. #### Parameters
NameTypeDescriptionDefault ValueRequired

Lock Token

String

Lock Token from the message to abandon. This represents a UUID for a message.

x

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:LOCK\_TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_EXPIRED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:ANY ### Complete `` This operation completes a message received from within a flow with a Message Listener operation in the current source. This is the same as an acknowledge. #### Parameters
NameTypeDescriptionDefault ValueRequired

Lock Token

String

Lock Token from the message to ACK. This represents a UUID for a message.

x

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:LOCK\_TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_EXPIRED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:ANY ### Dead Letter `` Sends the message associated with the Lock Token to the entity’s native dead-letter sub-queue, recording an optional reason and description on the dead-lettered message. This operation can be used only from inside a flow that also includes a **Message Listener** source. #### Parameters
NameTypeDescriptionDefault ValueRequired

Lock Token

String

Lock Token from the message to dead-letter. This represents a UUID for a message.

x

Dead Letter Reason

String

Reason recorded on the dead-lettered message describing why it was dead-lettered

Dead Letter Description

String

Human-readable description recorded on the dead-lettered message providing further detail about the dead-lettering

Properties To Modify

Object

Map of properties to stamp onto the dead-lettered message as application properties

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:LOCK\_TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_EXPIRED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:ANY ### Receive `` This operation receives a message from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:ANY ### Receive Batch `` This operation attempts to receive up to maxMessageCount messages from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. Due to the design of the Azure-provided SDK that Azure Service Bus Connector uses, the actual number of messages received may be fewer or more than the maxMessageCount specified. This behavior occurs because the Azure-provided SDK treats maxMessageCount as an approximation rather than a strict limit. Additionally, a null value may be returned if the operation exceeds the specified timeout or if there are no more messages to receive. > [!IMPORTANT] To ensure that all available messages are received, you might need to call this > operation multiple times. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Max Message Count

Number

Maximum number of messages that can be received

x

#### Output

Type

Array of Message of [Binary] payload and [Attributes Without Lock Token] attributes

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send `` This operation sends a message to a Queue or Topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Body

Binary

Body of this message

#[payload]

Message Id

String

Message identifier is an application-defined value that uniquely identifies the message and its payload

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Lists the possible strategies to determine the correlation ID to send on an outbound operation that supports correlation

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Message Session Id

String

Session identifier for a session-aware entity

Reply To

String

Name of the destination to which to send the message reply

Reply To Session Id

String

The ID of the Session associated with the message.

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

Relative duration, in milliseconds, after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Write Concern Timeout

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and therefore made available for retrieval

Properties

Object

Map of user application properties set on the message

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send batch of messages `` This operation sends a list of messages to a queue or topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Messages

Array of Object

Messages to send

#[payload]

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS - AZURE-SERVICE-BUS-MESSAGING:ANY ## Sources ### Message Listener `` Listens for messages from an Azure Service Bus queue or topic subscription. The source consumes messages and dispatches them to the flow for processing. Supports PeekLock and ReceiveAndDelete receive modes, session-aware receivers, configurable auto-lock renewal, and dead-letter queue consumption. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Ack Mode

Enumeration, one of:

  • IMMEDIATE

  • AUTO

  • MANUAL

Specifies the way to acknowledge received messages. AUTO and MANUAL uses the PeekLock mode. IMMEDIATE uses the ReceiveAndDelete mode.

x

Prefetch Count

Number

When Prefetch is enabled, the receiver quietly acquires more messages, up to the PrefetchCount limit, beyond what the application initially requested. Setting this value to zero (0) disables prefetching.

0

Message Session Id

String

Message session ID.

Number Of Consumers

Number

Number of concurrent consumers to use to receive messages

Buffered Mode

Boolean

Buffered mode is the default. In buffered mode, consumers send the message to the flow and immediately receive the next one. When disabled, consumers do not receive the next message until the current message exits the flow.

true

Enable Auto Lock Renewal

Boolean

Specifies whether the source should automatically renew message locks for session-aware queues, which prevents lock expiration during long-running message processing. The message lock renewal duration defaults to 5 minutes (hardcoded per Azure SDK). Flows exceeding 5 minutes of processing time experience lock expiration.

true

Max Auto Lock Renew Duration

String

Maximum duration for which the SDK keeps renewing the message lock automatically, expressed as an ISO-8601 duration (for example, PT5M, PT30M, PT2H). Only applies when Enable Auto Lock Renewal is enabled. Raise it for flows whose processing legitimately exceeds the broker-side lock duration. Longer values delay broker redelivery if the consumer hangs.

PT5M

Primary Node Only

Boolean

Whether this source should be executed only on the primary node when running in a cluster

true

Redelivery Policy

Defines a policy for processing the redelivery of the same message

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Consume From Dead Letter Queue

Boolean

When enabled, the listener consumes messages from the entity’s native dead-letter sub-queue ($deadletterqueue) instead of the main entity. Cannot be combined with a Session Id, since dead-letter queue messages are session-less.

false

Reconnection Strategy

Retry strategy in case of connectivity errors

Session Id

String

Session identifier for a session-aware entity

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) ## Types ### Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Count

Number

How many reconnection attempts to make

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance is allowed to be idle before it’s considered eligible for expiration

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

### Azure Message Attributes
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Error Description

String

Read-only, human-readable error description recorded on the dead-lettered message. Only populated when consuming from a dead-letter sub-queue.

Dead Letter Reason

String

Read-only reason recorded on the dead-lettered message describing why it was dead-lettered. Only populated when consuming from a dead-letter sub-queue.

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

LocalDateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

LocalDateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Lock Token

String

Lock token for the message. Used for MANUAL acknowledgment operations (Complete, Abandon, Dead Letter).

Locked Until Utc

LocalDateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

LocalDateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Duration

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times a message can be redelivered and processed unsuccessfully before triggering a process-failed-message

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returns. If not set, the default is SHA-256.

SHA-256

Id Expression

String

Defines one or more expressions to use to determine when a message is redelivered. This property can be set only if useSecureHash is false.

Object Store

Object Store

Object store where the redelivery counter for each message is stored

### Attributes Without Lock Token
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Error Description

String

Read-only, human-readable error description recorded on the dead-lettered message. Only populated when consuming from a dead-letter sub-queue.

Dead Letter Reason

String

Read-only reason recorded on the dead-lettered message describing why it was dead-lettered. Only populated when consuming from a dead-letter sub-queue.

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

LocalDateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

LocalDateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Locked Until Utc

LocalDateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

LocalDateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Duration

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.7 --- # Azure Service Bus Connector 3.7 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you install the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ http://www.mulesoft.org/schema/mule//current/mule-.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-azure-service-bus-connector x.x.x mule-plugin ``` Verify that the `` corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `azure service bus`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try [the examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.8 is-latest-version: true --- # Azure Service Bus Connector 3.8 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) makes it easy to build integrations that send messages to and receive messages from Azure Service Bus, which is an asynchronous messaging cloud platform. This connector supports communication with queues and topics and can perform actions such as: - Send to queue - Send to topic - Receive from queue - Receive from subscription To use the Azure management API for CRUD operations of queues, topics, subscriptions, and rules, use Anypoint Connector for Azure Service Bus Management (Azure Service Bus Management Connector). > [!NOTE] This connector supports integrations with Azure Service Bus (cloud). It does not work with > Microsoft Service Bus (on-premises). To connect with Microsoft Service Bus on-premises, use > Anypoint Connector for Microsoft Service Bus. > > This connector does not work with Event Hubs. For compatibility information and fixed issues, see the release notes. ## Before You Begin To use this connector, you must be familiar with: - The Azure Service Bus APIs - Anypoint connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Studio ## Audience - New user To create your Mule app, see: - [Studio Configuration](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-studio) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-examples), which provides one or more use cases for the connector. - Advanced user - Read the following: - [XML and Maven Support](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-xml-maven) - [Examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-examples) topics ## Authentication Types Azure Service Bus Connector supports the following connection types to connect to Azure: - Shared Access Signature (SAS) - Azure Active Directory (AAD) For information about configuring these authentication types, see [Using Anypoint Studio to Configure Azure Service Bus Connector](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-studio). ## Next Step After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-studio). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Azure Service Bus Management Connector](https://docs.mulesoft.com/azure-service-bus-management-connector/latest/) - [Azure Service Bus Connector on Exchange](https://anypoint.mulesoft.com/exchange/com.mulesoft.connectors/mule-azure-service-bus-connector/) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.8 is-latest-version: true --- # Azure Service Bus Connector 3.8 Examples > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The examples in this section show application flows that: - [Sends messages to and receives messages](#send-receive) from Azure Service Bus - [Sends and listens](#send-listen-ack) for messages and receives an acknowledgment using the `MANUAL` acknowledgment type - [Sends and receives batch messages](#batch-send-receive) - [Sends and receives messages using session IDs for session-aware queues](#send-receive-session-ids) - [Receives messages from dynamically generated sessions using a dynamic-session listener](#dynamic-sessions) - [Using Azure Active Directory connector provider](#using-aad-connector) These examples use variables for some field values. You can either: - Replace the variables with their values in the code - Provide the values for each variable in a properties file and then refer to that file from the connector configuration For more information about using a properties file, see [Configuring Property Placeholders](https://docs.mulesoft.com/mule-runtime/latest/mule-app-properties-to-configure) ## Create a Mule Project After you create a new Mule project and configure your credentials, you can create an application flow for each example by using the provided XML code. To create a Mule project: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. 3. Create a file named `mule-app.properties` and save it in `/src/main/resources`. 4. Configure your Azure connection credentials in the file `mule-app.properties`, and include the name of the Azure queue you created, for example: #============================================================== #Connection Parameters #============================================================== # Azure common authentication configuration azure.namespace=myazure queue.name=mytestqueue # Shared Access Signature authentication azure.keyname=SAStokenname azure.key=SAStoken # Azure Active Directory authentication azure.tenantId=TenantId azure.clientId=ClientId azure.clientSecret=ClientSecret 5. Save the file. 6. Open the **Global Element Configuration** and click **Test Connection** to verify your credentials. ## Send and Receive Example This flow shows an example of how to use the **Send** and **Receive From Queue** operations to send and receive messages: ![Example Azure Service Bus flow that uses the Send and Receive From Queue operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-send-receive.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Batch Send and Receive Example This application flow uses the **Send batch** and **Receive Batch** operations to send and receive batches of messages to and from an Azure Service Bus queue. The following screenshot shows the application flow for sending and receiving batch messages: ![Application flow that shows sending and receiving batch messages](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-send-receive-batch.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. Save the project. 5. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send, Listen, and Acknowledge the Message Example This application flow uses the **Send** and **Message Listener** operations. The **Message Listener** is using the `MANUAL` acknowledgment type, which means that the application logic is responsible for acknowledging receipt of the message. In this example, that logic is provided by adding the **Complete** operation to the same flow as the **Message Listener**. The following screenshot shows this flow: ![Application flow that shows how the Send, Message Listener, and Complete operations are used](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-send-listen-manual-ack.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Send and Receive Messages Using Session IDs for Session-Aware Queues Example This application flow uses the **Send** operation and **Message Listener** source. The flow is configured to use session IDs for session-aware queues. ![Four flows that have Scheduler, Set Payload, and Send operations](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-session-id-1.png) ![Flow that has first Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-session-id-2.png) ![Flow that has second Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-session-id-3.png) ![Flow that has third Message listener, Logger, Matches regex, another Logger, and error handling](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-session-id-4.png) To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Receive Messages from Dynamically Generated Sessions Example The [previous example](#send-receive-session-ids) locks each **Message Listener** to a fixed session ID that you know in advance. When the session IDs are generated dynamically and are not known ahead of time (for example, one session per order, device, or user), enable **Enable Dynamic Sessions** on the **Message Listener** instead. Each consumer then continuously accepts the next available session, drains it, and rolls to the next one, so a bounded pool of consumers services an unbounded set of session IDs. This flow uses the **Send** operation to send messages across several distinct session IDs to a session-aware queue and a single dynamic-session **Message Listener** to receive them. Because **Enable Dynamic Sessions** is enabled, the listener does not set a fixed **Message Session Id**. **Number Of Consumers** controls how many sessions the listener processes concurrently, and **Session Idle Timeout** controls how long a consumer waits for the next message in the currently locked session before releasing it and rolling to the next available session. For details about these fields, see the **Message Listener** section of the [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-reference#message-listener). To create this flow: 1. In the Studio canvas, click **Configuration XML**. 2. Delete all the contents after the line ``. 3. Copy and paste the following XML after the line ``: ```xml ``` 4. When you are prompted to regenerate `doc:id` values, click **Yes**. 5. Save the project. 6. Right-click in the Studio canvas and select **Run project ** to run the project. ## Using Azure Active Directory Connector Provider Some organizations use Azure Active Directory to authenticate their instances. Any of the previous examples can be modified to support this scenario. Replace the Shared Access Signature authentication with the Azure Active Directory authentication: ```xml ``` ```xml ``` Ensure that: - Your `mule-app.properties` file contains the **Tenant Id**, **Client Id**, and **Client Secret** fields. - Your app registration contains the proper [permissions and roles](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application). ## See Also - [Use Exchange to Discover Connectors, Templates, and Examples](https://docs.mulesoft.com/connectors/introduction/intro-use-exchange) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.8 is-latest-version: true --- # Azure Service Bus Connector 3.8 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) enables message integration with Azure Service Bus on the cloud. --- ## Configurations ### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Whether to specify a correlation ID when publishing messages. This applies both for custom correlation IDs specified at the operation level and for default correlation IDs taken from the current event.

AUTO

Zone Id

String

Zone ID property is used to identify the rules used to convert between an Instant and LocalDateTime. If the Zone ID equals Z, UTC is used. If the Zone ID is not specified, the system default Zone ID is used.

Name

String

ID used to reference this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

#### Connection Types ##### Shared Access Signature The SAS connection type uses the SAS Key Name and the SAS Key to generate a token, which is used by the Azure Service Bus SDK to establish the connection to the Service Bus instance. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

The namespace contains the resources to which the connector can establish a connection.

x

Shared access key name

String

Name of the Shared Access key

x

Shared access key

String

Shared Access key

x

Response Timeout

Number

Amount of time to wait for the operation to execute before throwing an error. This value is qualified by the Response Timeout TimeUnit.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Response Timeout value

SECONDS

Minimum Retry Backoff

Number

The minimum backoff interval for the retry. This must be a positive integer and setting it to zero results in ineffective retry behavior.

1

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the Minimum Retry Backoff value

SECONDS

Maximum Retry Backoff

Number

The maximum backoff interval for the retry

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Maximum Retry Backoff value

SECONDS

Retries

Number

The maximum amount of retries that the connector will attempt

10

Increased Wait On Server Busy (Deprecated)

Number

Amount of additional time to wait whenever there’s a ServerBusyException

0

Increased Wait On Server Busy Time Unit (Deprecated)

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test does not pass after exhausting the associated reconnection strategy.

##### Azure Active Directory The Azure Active Directory (Azure AD) connection type provides role-based access control (RBAC), in which users can use [Azure AD app registrations](https://learn.microsoft.com/en-us/azure/service-bus-messaging/authenticate-application) to generate a **Client Id** and a **Client Secret** for authentication. ###### Parameters
NameTypeDescriptionDefault ValueRequired

Service namespace

String

Namespace that contains resources to which the connector establishes a connection.

x

Azure endpoint

String

Constructs the complete URL that the connector uses to establish a connection.

servicebus.windows.net

Tenant Id

String

Tenant in which the app registration and the Azure Service Bus instance are running.

x

Client Id

String

ID of the app registration.

x

Client Secret

String

Secret key of the app registration.

x

Response Timeout

Number

How long to wait for an operation to execute before throwing an error.

30

Response Timeout Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Response Timeout field.

SECONDS

Minimum Retry Backoff

Number

Minimum backoff interval for the retry. This must be a positive integer and setting it to zero results in ineffective retry behavior.

1

Minimum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Minimum Retry Backoff field.

SECONDS

Maximum Retry Backoff

Number

Maximum backoff interval for the retry.

30

Maximum Retry Backoff Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Maximum Retry Backoff field.

SECONDS

Retries

Number

Maximum number of retries that the connector attempts.

10

Increased Wait On Server Busy (Deprecated)

Number

Amount of additional time to wait whenever there’s a ServerBusyException

0

Increased Wait On Server Busy Time Unit (Deprecated)

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit which qualifies the Increased wait on server busy value

SECONDS

Cache Producers

Boolean

When checked the producer for a given destination is cached

true

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test does not pass after exhausting the associated reconnection strategy.

## List of Operations - [Abandon](#abandonMessage) - [Complete](#completeMessage) - [Dead Letter](#deadLetterMessage) - [Receive](#receive) - [Receive Batch](#receiveBatch) - [Send](#send) - [Send batch of messages](#sendMessageBatch) ## List of Sources - [Message Listener](#message-listener) ## Operations ### Abandon `` Abandon message stored in the current receiver (This is equivalent to a NACK operation). This operation can be used only from inside a flow that also includes a **Message Listener Source** operation. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Lock Token

String

Lock Token from the message to abandon. This represents a UUID for a message.

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:LOCK\_TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Complete `` This operation completes a message received from within a flow with a Message Listener operation in the current source. This is the same as an acknowledge. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Lock Token

String

Lock Token from the message to ACK. This represents a UUID for a message.

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:LOCK\_TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_EXPIRED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Dead Letter `` Sends the message associated with the Lock Token to the entity’s native dead-letter sub-queue, recording an optional reason and description on the dead-lettered message. This operation can be used only from inside a flow that also includes a **Message Listener** source. #### Parameters
NameTypeDescriptionDefault ValueRequired

Lock Token

String

Lock Token from the message to dead-letter. This represents a UUID for a message.

x

Dead Letter Reason

String

Reason recorded on the dead-lettered message describing why it was dead-lettered

Dead Letter Description

String

Human-readable description recorded on the dead-lettered message providing further detail about the dead-lettering

Properties To Modify

Object

Map of properties to stamp onto the dead-lettered message as application properties

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:LOCK\_TOKEN\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:TOKEN\_EXPIRED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:ANY ### Receive `` This operation receives a message from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Target Variable

String

Name of the variable in which to store the operation’s output

Target Value

String

Expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

#### Output

Type

Binary

Attributes Type

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Receive Batch `` This operation attempts to receive up to maxMessageCount messages from a specific queue or subscription. In this version of the connector, only Immediate Receive Mode (`RECEIVEANDDELETE`) is supported. Due to the design of the Azure-provided SDK that Azure Service Bus Connector uses, the actual number of messages received may be fewer or more than the maxMessageCount specified. This behavior occurs because the Azure-provided SDK treats maxMessageCount as an approximation rather than a strict limit. Additionally, a null value may be returned if the operation exceeds the specified timeout or if there are no more messages to receive. > [!IMPORTANT] To ensure that all available messages are received, you might need to call this > operation multiple times. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Max Message Count

Number

Maximum number of messages that can be received

x

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Target Variable

String

Name of the variable in which to store the operation’s output

Target Value

String

Expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors

#### Output

Type

Array of Message of [Binary] payload and [Attributes Without Lock Token] attributes

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send `` This operation sends a message to a Queue or Topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Body

Binary

Body of this message

#[payload]

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Message Id

String

Message identifier is an application-defined value that uniquely identifies the message and its payload

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Lists the possible strategies to determine the correlation ID to send on an outbound operation that supports correlation

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Message Session Id

String

Session identifier for a session-aware entity

Reply To

String

Name of the destination to which to send the message reply

Reply To Session Id

String

The ID of the Session associated with the message.

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

Relative duration, in milliseconds, after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Write Concern Timeout

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and therefore made available for retrieval

Properties

Object

Map of user application properties set on the message

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ### Send batch of messages `` This operation sends a list of messages to a queue or topic. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use

x

Destination Name

String

Destination name to which to send the message

x

Messages

Array of Any

Messages to send

#[payload]

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

### For Configurations - [Configurations](#config) #### Throws - AZURE-SERVICE-BUS-MESSAGING:PAYLOAD\_SIZE\_EXCEEDED - AZURE-SERVICE-BUS-MESSAGING:OPERATION\_TIMEOUT - AZURE-SERVICE-BUS-MESSAGING:INVALID\_SIGNATURE - AZURE-SERVICE-BUS-MESSAGING:NOT\_ENOUGH\_PERMITS - AZURE-SERVICE-BUS-MESSAGING:CONNECTIVITY - AZURE-SERVICE-BUS-MESSAGING:DESTINATION\_NOT\_FOUND - AZURE-SERVICE-BUS-MESSAGING:INVALID\_PARAMS - AZURE-SERVICE-BUS-MESSAGING:RETRY\_EXHAUSTED - AZURE-SERVICE-BUS-MESSAGING:ANY ## Sources ### Message Listener `` Listens for messages from an Azure Service Bus queue or topic subscription. The source consumes messages and dispatches them to the flow for processing. Supports PeekLock and ReceiveAndDelete receive modes, session-aware receivers, configurable auto-lock renewal, and dead-letter queue consumption. #### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Acknowledgement mode

Enumeration, one of:

  • IMMEDIATE

  • AUTO

  • MANUAL

Specifies the way to acknowledge received messages. AUTO and MANUAL uses the PeekLock mode. IMMEDIATE uses the ReceiveAndDelete mode.

x

Prefetch Count

Number

When Prefetch is enabled, the receiver quietly acquires more messages, up to the PrefetchCount limit, beyond what the application initially requested. Setting this value to zero (0) disables prefetching.

0

Message Session Id

String

Message session ID. Must be omitted when Enable Dynamic Sessions is true.

Number Of Consumers

Number

Number of concurrent consumers to use to receive messages

Buffered Mode

Boolean

Buffered mode is the default. In buffered mode, consumers send the message to the flow and immediately receive the next one. When disabled, consumers do not receive the next message until the current message exits the flow.

true

Enable Auto Lock Renewal

Boolean

Specifies whether the source should automatically renew message locks for session-aware queues, which prevents lock expiration during long-running message processing. The message lock renewal duration defaults to 5 minutes (hardcoded per Azure SDK). Flows exceeding 5 minutes of processing time experience lock expiration.

true

Max Auto Lock Renew Duration

String

Maximum duration for which the SDK keeps renewing the message lock automatically, expressed as an ISO-8601 duration (for example, PT5M, PT30M, PT2H). Only applies when Enable Auto Lock Renewal is enabled. Raise it for flows whose processing legitimately exceeds the broker-side lock duration. Longer values delay broker redelivery if the consumer hangs.

PT5M

Primary Node Only

Boolean

Whether this source should be executed only on the primary node when running in a cluster

true

Redelivery Policy

Defines a policy for processing the redelivery of the same message

Destination Name

String

Name of the destination from which messages are received

x

Subscription Name

String

Name of the subscription from which messages are received

NONE

Consume From Dead Letter Queue

Boolean

When enabled, the listener consumes messages from the entity’s native dead-letter sub-queue ($deadletterqueue) instead of the main entity. Cannot be combined with a fixed Message Session Id or with Enable Dynamic Sessions, since dead-letter queue messages are session-less.

false

Enable Dynamic Sessions

Boolean

When enabled, the listener continuously accepts the next available Service Bus session instead of a fixed Message Session Id, draining each session and rolling to the next. Use this for session-enabled entities whose session IDs are generated dynamically and not known in advance. Number Of Consumers controls how many sessions are processed concurrently. Cannot be combined with a fixed Message Session Id or with Consume From Dead Letter Queue.

false

Session Idle Timeout

String

Applies only when Enable Dynamic Sessions is enabled. Maximum time a consumer waits for the next message within the currently locked session before treating the session as idle, releasing it, and rolling to the next available session. Expressed as an ISO-8601 duration (for example, PT30S, PT1M). Lower values roll off quiet sessions faster for better fairness across many sessions. Higher values keep active sessions locked longer with less lock churn.

PT30S

Output Mime Type

String

MIME type of the payload that this operation outputs

Output Encoding

String

Encoding of the payload that this operation outputs

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Reconnection Strategy

Retry strategy in case of connectivity errors

Session Id

String

Session identifier for a session-aware entity

Body

Binary

Body of the message

#[payload]

Message Id

String

Message identifier is an application-defined value that uniquely identifies the message and its payload

Send Correlation Strategy

Enumeration, one of:

  • AUTO

  • ALWAYS

  • NEVER

Lists the possible strategies to determine the correlation ID to send on an outbound operation that supports correlation

AUTO

Correlation Id

String

Allows an application to specify a context for the message for the purposes of correlation

Reply To

String

Standard way to express a reply path to the receiver of the message

Reply To Session Id

String

Session identifier for a session-aware entity

Label

String

Enables the application to indicate the purpose of the message to the receiver

Partition Key

String

For partitioned entities, setting this value enables assigning related messages to the same internal partition, so that the submission sequence order is correctly recorded.

Time To Live

Number

Relative duration after which the message expires, starting from the instant the message is accepted and stored by the broker

Time To Live Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Time To Live field.

SECONDS

Scheduled Enqueue Time Utc

DateTime

Defines the UTC instant at which the message is logically enqueued, sequenced, and therefore made available for retrieval

Properties

Object

Map of user application properties set on the message

#### Output

Type

Any

Attributes Type

### For Configurations - [Configurations](#config) ## Types ### Reconnection
FieldTypeDescriptionDefault ValueRequired

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

### Reconnect
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

Count

Number

How many reconnection attempts to make

### Reconnect Forever
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often in milliseconds to reconnect

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

### Expiration Policy
FieldTypeDescriptionDefault ValueRequired

Max Idle Time

Number

A scalar time value for the maximum amount of time a dynamic configuration instance is allowed to be idle before it’s considered eligible for expiration

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A time unit that qualifies the maxIdleTime attribute

### Azure Message Attributes
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Error Description

String

Read-only, human-readable error description recorded on the dead-lettered message. Only populated when consuming from a dead-letter sub-queue.

Dead Letter Reason

String

Read-only reason recorded on the dead-lettered message describing why it was dead-lettered. Only populated when consuming from a dead-letter sub-queue.

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

DateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

DateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Lock Token

String

Lock token for the message. Used for MANUAL acknowledgment operations (Complete, Abandon, Dead Letter).

Locked Until Utc

DateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

DateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Any

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

### Redelivery Policy
FieldTypeDescriptionDefault ValueRequired

Max Redelivery Count

Number

Maximum number of times a message can be redelivered and processed unsuccessfully before triggering a process-failed-message

Use Secure Hash

Boolean

Whether to use a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returns. If not set, the default is SHA-256.

SHA-256

Message Identifier

Defines one or more expressions that determine whether a message was redelivered. This property can be set only if the Use Secure Hash field is false.

Id Expression

String

Defines one or more expressions to use to determine when a message is redelivered. This property can be set only if useSecureHash is false.

Object Store

ObjectStore

Object store where the redelivery counter for each message is stored

### Redelivery Policy Message Identifier Configures how to identify a redelivered message and how to find out when the message was redelivered.
FieldTypeDescriptionDefault ValueRequired

Use Secure Hash

Boolean

If true, Mule uses a secure hash algorithm to identify a redelivered message.

Id Expression

String

Defines one or more expressions that determine when a message was redelivered. You can set this property only if the Use Secure Hash field is false.

### Attributes Without Lock Token
FieldTypeDescriptionDefault ValueRequired

Correlation Id

String

Specifies a context for the message for correlation purposes

Dead Letter Error Description

String

Read-only, human-readable error description recorded on the dead-lettered message. Only populated when consuming from a dead-letter sub-queue.

Dead Letter Reason

String

Read-only reason recorded on the dead-lettered message describing why it was dead-lettered. Only populated when consuming from a dead-letter sub-queue.

Dead Letter Source

String

Read-only property that indicates the entity in which the message was unable to be delivered

Delivery Count

Number

Number of times message delivery was attempted. When a message lock expires, or when the message is abandoned by the receiver, delivery count increases.

Enqueued Time Utc

DateTime

The instant in UTC time when the message is accepted and stored in the entity

Expires At

DateTime

The instant in UTC time when the message is marked for removal and no longer able to be retrieved from the entity because of its expiration, which is controlled by Time to Live.

Label

String

States the purpose of the message to the receiver

Locked Until Utc

DateTime

UTC instant until which the message is kept locked in the queue or subscription

Message Id

String

Uniquely identifies the message and its payload

Partition Key

String

Used for partitioned entities to enable related messages to be assigned to the same internal partition so that submission sequence order of the messages is recorded correctly

Properties

Object

Reply To

String

Path for where the receiver of the message can reply

Reply To Session Id

String

Specify the specific session ID for where the application can receive messages

Scheduled Enqueue Time Utc

DateTime

Schedule the UTC time for when the message will appear in the queue

Sequence Number

Number

Unique 64-bit integer that is assigned to a message when the message is accepted and stored by the broker, and which functions as the message’s true ID

Session Id

String

Specifies the session association of the message for session-aware entities

Time To Live

Any

Relative duration after which time the message expires, starting at the moment the message is accepted and stored by the broker, as defined in Enqueued Time UTC

To

String

Reserved for future use in routing scenarios and currently ignored by the broker. Can be used by applications in rule-driven, auto-forward chaining interactions to specify the intended logical destination of the message

Via Partition Key

String

Selects the transfer queue partition when a message is sent through a transfer queue in the scope of a transaction

## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Azure Service Bus Connector Release Notes](https://docs.mulesoft.com/release-notes/connector/azure-service-bus-connector-release-notes-mule-4) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.8 is-latest-version: true --- # Azure Service Bus Connector 3.8 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you install the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ http://www.mulesoft.org/schema/mule//current/mule-.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule-azure-service-bus-connector x.x.x mule-plugin ``` Verify that the `` corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `azure service bus`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Next Step After completing your namespace and `pom.xml` file, you can try [the examples](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-examples). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.4 --- # Using Anypoint Studio to Configure Azure Service Bus Connector 3.4 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Azure Service Bus Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `azure service bus` in the search field. 3. Click **Azure Service Bus** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure an Input Source An input source initiates a flow when a specified condition is met. You can configure one of these input sources to use with Azure Service Bus Connector: - `Message Listener` Receives messages from the specified queue or subscription - `HTTP Listener` Initiates a flow each time it receives a request on the configured host and port - `Scheduler` Initiates a flow when a time-based condition is met For example, to configure **Message listener**, follow these steps: 1. In the **Mule Palette** view, select the Azure Service Bus Connector, then select **Message listener**. 2. Drag **Message listener** to the Studio canvas. 3. On the **Message listener** configuration screen, optionally change the value of the **Display Name** field. 4. From **Acknowledgment mode**, select from these options: - **Auto** Automatic acknowledgment of the received message only if the application flow executes successfully - **Immediate** Automatic acknowledgment of the message once it is consumed and prior to any processing of the message - **Manual** Delegates the responsibility for acknowledging the message to the application logic 5. In the **Destination** section, enter: - **Destination name** Name of the destination queue from which messages are received - **Subscription name** Name of the subscription from which messages are received 6. Click the plus sign (+) next to the **Connector configuration** field to [configure a global element](#configure-global-element) that can be used by all instances of **Message listener** in the app. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for Azure Service Bus Connector, follow these steps: 1. In the **Mule Palette** view, select **Azure Service Bus** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target Azure Service Bus Messaging system. One configuration you will have to configure is the connection provider. Azure Service Bus Connector accepts two types of connections: - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) ### Shared Access Signature (SAS) authentication To configure Shared Access Signature authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select the `Shared Access Signature` in the connection dropdown, and configure the following required fields for SAS authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Shared access key name**. This is the name of the SAS token configure in the Azure Service Bus namespace. 3. Enter the Azure **Shared access key**. This is the name of your SAS token. The following screenshot shows an example of configuring SAS authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.4/_images/azure-service-bus-sas-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the shared access key. ### Azure Active Directory (AAD) authentication To configure Azure Active Directory authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select `Active Directory Connection` in the connection dropdown, and configure the following required fields for AAD authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Tenant Id**. 3. Enter the Azure **Client Id**. 4. Enter the Azure **Client Secret**. The following screenshot shows an example of configuring AAD authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.4/_images/azure-service-bus-aad-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the app registration. ## View the App Log You can view the app log as follows: - If you’re running the app from the Anypoint Platform, the output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log is visible in your OS console. Unless the log file path was customized in the app’s log file (`log4j2.xml`), you can also view the app log in this default location: `MULE_HOME/logs/.log` For more information about the app log, see [Configuring Logging](https://docs.mulesoft.com/mule-runtime/latest/logging-in-mule). ### Reduce Excessive Logging When using the **Message Listener** source, the Azure Service Bus library emits an INFO-level log message approximately every 30 seconds, indicating that no new messages were received. To avoid this excessive logging, add the following AsyncLogger element to the `log4j.xml` file: `` ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.4/azure-service-bus-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.5 --- # Using Anypoint Studio to Configure Azure Service Bus Connector 3.5 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Azure Service Bus Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `azure service bus` in the search field. 3. Click **Azure Service Bus** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure an Input Source An input source initiates a flow when a specified condition is met. You can configure one of these input sources to use with Azure Service Bus Connector: - `Message Listener` Receives messages from the specified queue or subscription - `HTTP Listener` Initiates a flow each time it receives a request on the configured host and port - `Scheduler` Initiates a flow when a time-based condition is met For example, to configure **Message listener**, follow these steps: 1. In the **Mule Palette** view, select the Azure Service Bus Connector, then select **Message listener**. 2. Drag **Message listener** to the Studio canvas. 3. On the **Message listener** configuration screen, optionally change the value of the **Display Name** field. 4. From **Acknowledgment mode**, select from these options: - **Auto** Automatic acknowledgment of the received message only if the application flow executes successfully - **Immediate** Automatic acknowledgment of the message once it is consumed and prior to any processing of the message - **Manual** Delegates the responsibility for acknowledging the message to the application logic 5. In the **Destination** section, enter: - **Destination name** Name of the destination queue from which messages are received - **Subscription name** Name of the subscription from which messages are received 6. Click the plus sign (+) next to the **Connector configuration** field to [configure a global element](#configure-global-element) that can be used by all instances of **Message listener** in the app. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for Azure Service Bus Connector, follow these steps: 1. In the **Mule Palette** view, select **Azure Service Bus** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target Azure Service Bus Messaging system. One configuration you will have to configure is the connection provider. Azure Service Bus Connector accepts two types of connections: - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) ### Shared Access Signature (SAS) authentication To configure Shared Access Signature authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select the `Shared Access Signature` in the connection dropdown, and configure the following required fields for SAS authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Shared access key name**. This is the name of the SAS token configure in the Azure Service Bus namespace. 3. Enter the Azure **Shared access key**. This is the name of your SAS token. The following screenshot shows an example of configuring SAS authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-sas-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the shared access key. ### Azure Active Directory (AAD) authentication To configure Azure Active Directory authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select `Active Directory Connection` in the connection dropdown, and configure the following required fields for AAD authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Tenant Id**. 3. Enter the Azure **Client Id**. 4. Enter the Azure **Client Secret**. The following screenshot shows an example of configuring AAD authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.5/_images/azure-service-bus-aad-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the app registration. ## View the App Log You can view the app log as follows: - If you’re running the app from the Anypoint Platform, the output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log is visible in your OS console. Unless the log file path was customized in the app’s log file (`log4j2.xml`), you can also view the app log in this default location: `MULE_HOME/logs/.log` For more information about the app log, see [Configuring Logging](https://docs.mulesoft.com/mule-runtime/latest/logging-in-mule). ### Reduce Excessive Logging When using the **Message Listener** source, the Azure Service Bus library emits an INFO-level log message approximately every 30 seconds, indicating that no new messages were received. To avoid this excessive logging, add the following AsyncLogger element to the `log4j.xml` file: `` ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.5/azure-service-bus-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.6 --- # Using Anypoint Studio to Configure Azure Service Bus Connector 3.6 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Azure Service Bus Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `azure service bus` in the search field. 3. Click **Azure Service Bus** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure an Input Source An input source initiates a flow when a specified condition is met. You can configure one of these input sources to use with Azure Service Bus Connector: - `Message Listener` Receives messages from the specified queue or subscription - `HTTP Listener` Initiates a flow each time it receives a request on the configured host and port - `Scheduler` Initiates a flow when a time-based condition is met For example, to configure **Message listener**, follow these steps: 1. In the **Mule Palette** view, select the Azure Service Bus Connector, then select **Message listener**. 2. Drag **Message listener** to the Studio canvas. 3. On the **Message listener** configuration screen, optionally change the value of the **Display Name** field. 4. From **Acknowledgment mode**, select from these options: - **Auto** Automatic acknowledgment of the received message only if the application flow executes successfully - **Immediate** Automatic acknowledgment of the message once it is consumed and prior to any processing of the message - **Manual** Delegates the responsibility for acknowledging the message to the application logic 5. In the **Destination** section, enter: - **Destination name** Name of the destination queue from which messages are received - **Subscription name** Name of the subscription from which messages are received 6. Click the plus sign (+) next to the **Connector configuration** field to [configure a global element](#configure-global-element) that can be used by all instances of **Message listener** in the app. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for Azure Service Bus Connector, follow these steps: 1. In the **Mule Palette** view, select **Azure Service Bus** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target Azure Service Bus Messaging system. One configuration you will have to configure is the connection provider. Azure Service Bus Connector accepts two types of connections: - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) ### Shared Access Signature (SAS) authentication To configure Shared Access Signature authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select the `Shared Access Signature` in the connection dropdown, and configure the following required fields for SAS authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Shared access key name**. This is the name of the SAS token configure in the Azure Service Bus namespace. 3. Enter the Azure **Shared access key**. This is the name of your SAS token. The following screenshot shows an example of configuring SAS authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-sas-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the shared access key. ### Azure Active Directory (AAD) authentication To configure Azure Active Directory authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select `Active Directory Connection` in the connection dropdown, and configure the following required fields for AAD authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Tenant Id**. 3. Enter the Azure **Client Id**. 4. Enter the Azure **Client Secret**. The following screenshot shows an example of configuring AAD authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.6/_images/azure-service-bus-aad-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the app registration. ## View the App Log You can view the app log as follows: - If you’re running the app from the Anypoint Platform, the output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log is visible in your OS console. Unless the log file path was customized in the app’s log file (`log4j2.xml`), you can also view the app log in this default location: `MULE_HOME/logs/.log` For more information about the app log, see [Configuring Logging](https://docs.mulesoft.com/mule-runtime/latest/logging-in-mule). ### Reduce Excessive Logging When using the **Message Listener** source, the Azure Service Bus library emits an INFO-level log message approximately every 30 seconds, indicating that no new messages were received. To avoid this excessive logging, add the following AsyncLogger element to the `log4j.xml` file: `` ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.6/azure-service-bus-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.7 --- # Using Anypoint Studio to Configure Azure Service Bus Connector 3.7 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Azure Service Bus Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `azure service bus` in the search field. 3. Click **Azure Service Bus** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure an Input Source An input source initiates a flow when a specified condition is met. You can configure one of these input sources to use with Azure Service Bus Connector: - `Message Listener` Receives messages from the specified queue or subscription - `HTTP Listener` Initiates a flow each time it receives a request on the configured host and port - `Scheduler` Initiates a flow when a time-based condition is met For example, to configure **Message listener**, follow these steps: 1. In the **Mule Palette** view, select the Azure Service Bus Connector, then select **Message listener**. 2. Drag **Message listener** to the Studio canvas. 3. On the **Message listener** configuration screen, optionally change the value of the **Display Name** field. 4. From **Ack Mode**, select from these options: - **Auto** Automatic acknowledgment of the received message only if the application flow executes successfully - **Immediate** Automatic acknowledgment of the message once it is consumed and prior to any processing of the message - **Manual** Delegates the responsibility for acknowledging the message to the application logic 5. In the **Destination** section, enter: - **Destination name** Name of the destination queue from which messages are received - **Subscription name** Name of the subscription from which messages are received 6. Click the plus sign (+) next to the **Connector configuration** field to [configure a global element](#configure-global-element) that can be used by all instances of **Message listener** in the app. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for Azure Service Bus Connector, follow these steps: 1. In the **Mule Palette** view, select **Azure Service Bus** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target Azure Service Bus Messaging system. One configuration you will have to configure is the connection provider. Azure Service Bus Connector accepts two types of connections: - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) ### Shared Access Signature (SAS) authentication To configure Shared Access Signature authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select the `Shared Access Signature` in the connection dropdown, and configure the following required fields for SAS authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Shared access key name**. This is the name of the SAS token configure in the Azure Service Bus namespace. 3. Enter the Azure **Shared access key**. This is the name of your SAS token. The following screenshot shows an example of configuring SAS authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-sas-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the shared access key. ### Azure Active Directory (AAD) authentication To configure Azure Active Directory authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select `Active Directory Connection` in the connection dropdown, and configure the following required fields for AAD authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Tenant Id**. 3. Enter the Azure **Client Id**. 4. Enter the Azure **Client Secret**. The following screenshot shows an example of configuring AAD authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/3.7/_images/azure-service-bus-aad-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the app registration. ## View the App Log You can view the app log as follows: - If you’re running the app from the Anypoint Platform, the output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log is visible in your OS console. Unless the log file path was customized in the app’s log file (`log4j2.xml`), you can also view the app log in this default location: `MULE_HOME/logs/.log` For more information about the app log, see [Configuring Logging](https://docs.mulesoft.com/mule-runtime/latest/logging-in-mule). ### Reduce Excessive Logging When using the **Message Listener** source, the Azure Service Bus library emits an INFO-level log message approximately every 30 seconds, indicating that no new messages were received. To avoid this excessive logging, add the following AsyncLogger element to the `log4j.xml` file: `` ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/3.7/azure-service-bus-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Azure Service Bus Connector version: 3.8 is-latest-version: true --- # Using Anypoint Studio to Configure Azure Service Bus Connector 3.8 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure an input source for the connector’s flow](#configure-input-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure the connector: 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Azure Service Bus Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In the **Mule Palette** view, click **(X) Search in Exchange**. 2. In **Add Modules to Project**, type `azure service bus` in the search field. 3. Click **Azure Service Bus** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace. ## Configure an Input Source An input source initiates a flow when a specified condition is met. You can configure one of these input sources to use with Azure Service Bus Connector: - `Message Listener` Receives messages from the specified queue or subscription - `HTTP Listener` Initiates a flow each time it receives a request on the configured host and port - `Scheduler` Initiates a flow when a time-based condition is met For example, to configure **Message listener**, follow these steps: 1. In the **Mule Palette** view, select the Azure Service Bus Connector, then select **Message listener**. 2. Drag **Message listener** to the Studio canvas. 3. On the **Message listener** configuration screen, optionally change the value of the **Display Name** field. 4. From **Ack Mode**, select from these options: - **Auto** Automatic acknowledgment of the received message only if the application flow executes successfully - **Immediate** Automatic acknowledgment of the message once it is consumed and prior to any processing of the message - **Manual** Delegates the responsibility for acknowledging the message to the application logic 5. In the **Destination** section, enter: - **Destination name** Name of the destination queue from which messages are received - **Subscription name** Name of the subscription from which messages are received 6. Click the plus sign (+) next to the **Connector configuration** field to [configure a global element](#configure-global-element) that can be used by all instances of **Message listener** in the app. 7. (Optional) To receive messages from session IDs that are generated dynamically and not known in advance, select the **Advanced** tab and select **Enable Dynamic Sessions**. When this option is enabled, each consumer continuously accepts the next available Service Bus session, drains it, and rolls to the next one, instead of locking a fixed **Message Session Id**. - Use **Number Of Consumers** to control how many sessions are processed concurrently. - Use **Session Idle Timeout** (an ISO-8601 duration such as `PT30S`) to control how long a consumer waits for the next message in the currently locked session before releasing it and rolling to the next available session. **Enable Dynamic Sessions** cannot be combined with a fixed **Message Session Id** or with **Consume From Dead Letter Queue**. For details about these fields, see the **Message Listener** section of the [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-reference#message-listener). ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you immediately define a specific operation for that connector to perform. To add an operation for Azure Service Bus Connector, follow these steps: 1. In the **Mule Palette** view, select **Azure Service Bus** and then select the desired operation. 2. Drag the operation onto the Studio canvas to the right of the input source. ## Configure a Global Element for the Connector When you configure a connector, it’s best to configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials the connector uses to access the target Azure Service Bus Messaging system. One configuration you will have to configure is the connection provider. Azure Service Bus Connector accepts two types of connections: - [Shared Access Signature (SAS)](#configure-global-element-sas-connection) - [Azure Active Directory (AAD)](#configure-global-element-aad-connection) ### Shared Access Signature (SAS) authentication To configure Shared Access Signature authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select the `Shared Access Signature` in the connection dropdown, and configure the following required fields for SAS authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Shared access key name**. This is the name of the SAS token configure in the Azure Service Bus namespace. 3. Enter the Azure **Shared access key**. This is the name of your SAS token. The following screenshot shows an example of configuring SAS authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-sas-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the shared access key. ### Azure Active Directory (AAD) authentication To configure Azure Active Directory authentication for Azure Service Bus Connector, follow these steps: 1. Select the name of the connector in the Studio canvas. 2. In the configuration screen for the operation, click the plus sign (+) next to the **Connector configuration** field to access the global element configuration fields. 3. On the **General** tab, select `Active Directory Connection` in the connection dropdown, and configure the following required fields for AAD authentication: 1. Enter the Azure **Service namespace**. This is the unique name assigned to the namespace when it was created and is the host-name portion of the URL, for example: `https://{serviceNamespace}.servicebus.windows.net/{path}` 2. Enter the Azure **Tenant Id**. 3. Enter the Azure **Client Id**. 4. Enter the Azure **Client Secret**. The following screenshot shows an example of configuring AAD authentication for Azure Service Bus Connector: ![Authentication configuration of fields on the General tab](/mulesoft/current/en-us/microsoft-azure-sb-connector/latest/_images/azure-service-bus-aad-connection.png) You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). 4. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 5. Click **Test Connection** to confirm that Mule can connect with the specified server. 6. Click **OK**. > [!NOTE] Azure Service Bus Connector cannot perform a connectivity test at startup using the > `Test Connection` button in the global element of the connector configuration when you restrict > access to your resources and you have a security policy with permissions at the resource level > only. This is because the security policy targets the root level of the namespace, which might be > forbidden due to the customized policy applied to the app registration. ## View the App Log You can view the app log as follows: - If you’re running the app from the Anypoint Platform, the output is visible in the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log is visible in your OS console. Unless the log file path was customized in the app’s log file (`log4j2.xml`), you can also view the app log in this default location: `MULE_HOME/logs/.log` For more information about the app log, see [Configuring Logging](https://docs.mulesoft.com/mule-runtime/latest/logging-in-mule). ### Reduce Excessive Logging When using the **Message Listener** source, the Azure Service Bus library emits an INFO-level log message approximately every 30 seconds, indicating that no new messages were received. To avoid this excessive logging, add the following AsyncLogger element to the `log4j.xml` file: `` ## Next Step After you configure a global element and connection information, configure the other fields for the connector. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Azure Service Bus Connector Reference](https://docs.mulesoft.com/microsoft-azure-sb-connector/latest/azure-service-bus-connector-reference) - [Salesforce Help](https://help.salesforce.com)