Azure Service Bus sender

1. Overview

This producer puts a message on an Azure Service Bus queue or topic. It takes the content of the MessagePart In and sends it as the body of a new message, and it is the last component of the flow.

A queue accepts a message and returns no answer, so nothing comes back into the flow.

If you need to send a message halfway through a flow and then carry on, use the Azure Service Bus service with its Action set to SEND instead.

2. Attributes

In the table below, you will find an explanation of these properties. All attributes with a * are mandatory. Attributes marked (advanced) are hidden until you open the advanced section; their defaults suit almost every flow.

The Azure Service Bus sender properties
Attribute Description

Name*

By default, we fill this out with the technical tag, followed by a serial number. Changing the name is optional.

Enabled

Set this value to true, if you want this sender to be enabled.

Authentication

How to prove who you are. SHARED_ACCESS_KEY (the default) asks for the namespace, the policy name and the key separately and builds the connection string for you. CONNECTION_STRING takes the whole string as the portal shows it, and is the one to use for the local emulator. CLIENT_SECRET uses a Microsoft Entra ID application registration.

Connection String*

Only shown for CONNECTION_STRING. The shared access signature of the namespace or the entity. The Constructor shows it masked. To keep the key out of the flow, tick the Dynamic checkbox next to the field, or enter ${servicebus.connection-string} and set that property once per agent — see Keeping the connection string out of the flow.

Fully Qualified Namespace*

Shown for SHARED_ACCESS_KEY and CLIENT_SECRET. The namespace to connect to, in the form <namespace>.servicebus.windows.net. A namespace pasted from the Azure portal, with sb:// in front or a slash behind, is accepted as well.

Shared Access Key Name*

Only shown for SHARED_ACCESS_KEY. Name of the policy, as the Azure portal lists it under Shared access policies.

Shared Access Key*

Only shown for SHARED_ACCESS_KEY. The primary or secondary key of that policy. The Constructor shows it masked. Tick the Dynamic checkbox next to the field to have the key asked for when the interface is installed, once per environment; a key shared by every flow on one agent can instead be ${servicebus.shared-access-key} in the agent properties.

Tenant ID*

Only shown for CLIENT_SECRET. The directory (tenant) ID of the application registration.

Client ID*

Only shown for CLIENT_SECRET. The application (client) ID of the registration.

Client Secret*

Only shown for CLIENT_SECRET. The secret of the registration, which needs a Service Bus role such as Azure Service Bus Data Sender on the namespace or the entity. The Constructor shows it masked.

Entity Type

Whether this sender writes to a QUEUE (the default) or a TOPIC.

Queue Name*

Only shown for QUEUE. Name of the queue to send to. The queue has to exist already; the agent never creates entities.

Topic Name*

Only shown for TOPIC. Name of the topic to send to. A sender never names a subscription: the topic decides which subscriptions receive the message.

MessagePart In

Name of the MessagePart whose content is sent as the message body. The default is msgprt0. Choose ALL-XML to send a rendering of the whole ConnectMessage instead.

Session ID Specification Type

Where the session id of the outgoing message comes from: NONE (the default), a FIXED value, a HEADER (a ConnectMessage property), or an EXPRESSION. With NONE the servicebus_session_id property is still forwarded when the flow set one.

Fixed Session ID*

Only shown for FIXED. The session id every outgoing message gets.

Session ID Property*

Only shown for HEADER. Name of the ConnectMessage property that holds the session id.

Session ID Expression*

Only shown for EXPRESSION. The expression that produces the session id, for example headers['orderId'].

Subject

Subject, also called label, of every outgoing message. Leave it empty to use the servicebus_subject property of the ConnectMessage.

Content Type

Content type of every outgoing message, for example application/json. Leave it empty to use the servicebus_content_type property.

Time To Live (seconds)

How long the message stays on the entity. Leave it empty to use the entity’s own default.

Application Properties

Comma separated list of ConnectMessage properties to send along as application properties. Nothing else is forwarded.

Transport Type (advanced)

AMQP (the default) connects on port 5671. Choose AMQP_WEB_SOCKETS to tunnel over port 443 when a proxy or firewall blocks that port.

Forward Message ID (advanced)

Whether the message id of the incoming message is reused on the outgoing one. The default is false, because duplicate detection on the target entity silently drops a message whose id it has seen before.

Charset (advanced)

The character set the body is encoded with. Leave it empty for UTF-8.

Description

Description of the specific sender. This is for documentation purposes.

3. What can be sent

The sender accepts text, raw bytes, and an XML document, which is sent as XML in the configured character set.

Any other content is refused, naming the kind of message part it found, and the message fails into the exception handling of the flow. Nothing is published in that case.

A session id and a partition key cannot both be set on one message. When the flow supplies both, the partition key is dropped, because Service Bus requires the two to be equal.

4. Sessions

A session groups messages that have to be processed in order. Set Session ID Specification Type when the target entity requires sessions, and use a value that identifies the group — an order number, a customer id, a file name.

A HEADER or EXPRESSION session id that resolves to nothing fails the message rather than sending it without a session, because a message without a session id cannot be delivered to a session-enabled entity.