Azure Service Bus icon

Azure Service Bus

Send and receive messages from Azure Service Bus

Actions3

Overview

This node enables sending messages to an Azure Service Bus Topic using either the official Azure SDK or the HTTP REST API. It is designed for scenarios where you want to integrate workflows with Azure's messaging infrastructure, allowing asynchronous communication between distributed systems.

Typical use cases include:

  • Publishing event notifications or commands to multiple subscribers via topics.
  • Sending structured data or JSON payloads to downstream services listening on Azure Service Bus Topics.
  • Leveraging session-enabled topics by specifying a session ID for ordered message processing.

For example, you might use this node to send order details as messages to a topic that multiple microservices subscribe to for further processing.

Properties

Name Meaning
Protocol Protocol to use for Azure Service Bus connection. Options:
- Azure SDK (Recommended)
- HTTP REST API (firewall-friendly)
Topic Name The name of the Azure Service Bus topic to which the message will be sent.
Message Body The content/body of the message to send. Typically a string or JSON payload.
Session ID Optional session identifier for session-enabled topics to group related messages.
Message Properties Custom key-value properties to attach to the message as application properties.
Content Type MIME type of the message body, e.g., application/json.
Message ID Unique identifier for the message, useful for deduplication or tracking.

Output

The node outputs an array of JSON objects, each representing a sent message with the following structure:

{
  "success": true,
  "messageId": "string",      // The unique message ID if provided
  "topicName": "string",      // The topic name the message was sent to
  "sentAt": "ISO8601 string"  // Timestamp when the message was sent
}

There is no binary output from this node.

Dependencies

  • Requires an Azure Service Bus connection string credential with appropriate permissions to send messages to the specified topic.
  • If using the Azure SDK protocol, the node depends on the official @azure/service-bus package and optionally ws for WebSocket transport.
  • For the HTTP REST API protocol, it uses standard HTTPS requests with Shared Access Signature (SAS) token authentication generated from the connection string.
  • No additional environment variables are required beyond the configured credentials.

Troubleshooting

  • Missing or invalid connection string: The node throws an error if the connection string is missing or contains placeholder blank values. Ensure the connection string is correctly entered in the credentials.
  • Empty message body: Sending a message without a body results in an error. Always provide a non-empty message body.
  • Protocol mismatch: Topic operations only support the Azure SDK protocol. Attempting to send messages to a topic using the HTTP REST API protocol will cause an error.
  • WebSocket errors: If WebSocket transport is unavailable, the node falls back to default transport but logs warnings. This usually does not block operation.
  • HTTP errors: When using the HTTP REST API, any non-success HTTP response will throw an error with the status code and message. Check network connectivity and SAS token validity.
  • Session ID usage: If your topic is session-enabled, ensure the session ID is set; otherwise, messages may not be processed as expected.

Links and References

Discussion