Azure Service Bus service

1. Overview

This service sends or receives one Azure Service Bus message halfway through a flow, and the flow carries on afterwards.

  • SEND puts the content of the MessagePart In on a queue or topic and passes the message on unchanged. Use it to drop a copy somewhere without ending the flow.

  • RECEIVE takes one message off a queue or subscription and stores it in the MessagePart Out. Use it to fetch a waiting message in the middle of a flow.

To start a flow from a queue use the Azure Service Bus listener; to end one, the Azure Service Bus sender.

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 service 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 service to be enabled.

Action

SEND (the default) puts a message on the entity, RECEIVE takes one off it.

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 on the namespace or the entity. The Constructor shows it masked.

Entity Type

Whether this service talks to a QUEUE (the default) or a TOPIC.

Queue Name*

Only shown for QUEUE. Name of the queue.

Topic Name*

Only shown for TOPIC. Name of the topic.

Subscription Name

Only shown for TOPIC. Name of the subscription. Required to RECEIVE from a topic, unused when sending.

MessagePart In

Name of the MessagePart whose content is sent. The default is msgprt0. A part name that is not in the message fails the message, so that the wrong body is never sent to a broker.

MessagePart Out

Name of the MessagePart a received message is placed in.

Receive Timeout (seconds)

Only shown for RECEIVE. How long to wait for a message. When nothing arrives in time the message fails into the exception handling of the flow. The default is 10.

Subject

Only shown for SEND. Subject, also called label, of the outgoing message. Leave it empty to use the servicebus_subject property.

Content Type

Only shown for SEND. Content type of the outgoing message. Leave it empty to use the servicebus_content_type property.

Time To Live (seconds)

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

Application Properties

Only shown for SEND. Comma separated list of ConnectMessage properties to send along as application properties.

Session ID Specification Type

Only shown for SEND. 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'].

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)

Only shown for SEND. Whether the message id of the incoming message is reused. 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 on SEND and decoded with on RECEIVE. Leave it empty for UTF-8.

Description

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

3. What RECEIVE does to the message

A received message replaces the servicebus_* properties an earlier message left on the ConnectMessage, so the flow always sees the properties of the message it just fetched.

RECEIVE removes the message from the entity before the flow travels on. A message it fetched is gone even when the rest of the flow fails afterwards. When a message must not be lost that way, start the flow with an Azure Service Bus listener in FLOW_SETTLED mode instead.

An empty entity is not an error of the entity but of this flow run: when nothing arrives within Receive Timeout (seconds), the message fails into the exception handling, where you decide what happens next.