Reference: Azure Service Bus Configuration#

This section describes how to configure the nJAMS Client for Mule4 to connect to Azure Service Bus (Premium) via JMS, using the SDK’s built-in factory (not JNDI). This approach is required because JNDI is not supported with the Azure JMS client.

This is the reference of available application related nJAMS Client for Mule4 properties.

Note

Any change in this configuration file requires a re-start of the MuleSoft Runtime Engine application instance.

Azure Service Bus SDK Settings#

To configure Azure Service Bus with the nJAMS SDK for Mule4, use the following properties:

########## SDK configuration ##########
### Communication settings ###
njams.sdk.communication=JMS

### Use the SDK's built-in Azure JMS factory ###
njams.sdk.communication.jms.connectionFactory=AzureServiceBusPremium

### Connection details ###
njams.sdk.communication.jms.username=RootManageSharedAccessKey
njams.sdk.communication.jms.password=<your-secret>
njams.sdk.communication.jms.destination=<your-queue>

### Azure Service Bus namespace URL ###
njams.sdk.communication.jms.java.naming.provider.url=sb://<your-namespace>.servicebus.windows.net

Note

Although this parameter still uses the JNDI-style key java.naming.provider.url, it is interpreted by the SDK directly and not used for JNDI lookup in this case.

If the value of connectionFactory does not match a known factory, JNDI lookup will be attempted.

Maximum Message Size#

Azure Service Bus Premium supports message sizes up to 100 MB. To allow proper handling of large payloads, configure the SDK setting below (in bytes):

njams.sdk.communication.maxMessageSize=104853504

This value must match the message size limit configured in Azure Service Bus.

Note

It is recommended to subtract a few KB from the actual limit (e.g., 4096 bytes) to accommodate header overhead.

Mule4 Client Inline Configuration Example#

The Mule4 client offers a graphical configuration interface. Use the following setup.

Connection Tab:

Azure Service Bus Connection Configuration

Advanced Tab:

Azure Service Bus Advanced Configuration