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 queue using either the official Azure SDK or the HTTP REST API. It is designed for scenarios where you need to integrate workflows with Azure messaging infrastructure, such as pushing event notifications, commands, or data payloads into a queue for asynchronous processing by other services.

Common use cases include:

  • Sending task or job requests to backend systems.
  • Triggering downstream processes via message queues.
  • Integrating cloud applications with Azure Service Bus for reliable message delivery.

For example, you can configure this node to send JSON-formatted messages containing order details to a queue named "orders" whenever a new order is created in your system.

Properties

Name Meaning
Protocol Protocol used to connect to Azure Service Bus:
- Azure SDK (Recommended)
- HTTP REST API
Queue Name The name of the target queue to which the message will be sent.
Message Body The content of the message to send. Can be any string, typically JSON or plain text.
Session ID Optional session identifier for session-enabled queues/topics to group related messages.
Message Properties Custom key-value pairs to add as application properties on the message.
Content Type MIME type of the message body, e.g., application/json.
Message ID Optional unique identifier for the message, useful for deduplication or tracking.

Output

The node outputs an array of JSON objects, one per input item/message sent, each containing:

  • success: Boolean indicating if the message was sent successfully.
  • messageId: The unique identifier of the sent message (if provided).
  • queueName: The name of the queue the message was sent to.
  • sentAt: ISO timestamp when the message was sent.

Example output item:

{
  "success": true,
  "messageId": "12345",
  "queueName": "my-queue",
  "sentAt": "2024-06-01T12:00:00.000Z"
}

No binary data is produced by this operation.

Dependencies

  • Requires an Azure Service Bus connection string credential with appropriate permissions to send messages.
  • Supports two protocols:
    • Official Azure Service Bus SDK (@azure/service-bus), optionally using WebSockets transport.
    • Azure Service Bus HTTP REST API, which requires generating SAS tokens from the connection string.
  • Node-fetch package is used internally for HTTP requests.
  • If using the SDK with WebSockets, the ws package is required.

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 and complete.
  • Empty message body: Sending a message with an empty or whitespace-only body results in an error. Always provide a valid message body.
  • Protocol misconfiguration: Using the HTTP protocol for receiving messages or topic operations is not supported and will cause errors.
  • WebSocket fallback: If WebSockets are unavailable, the node falls back to default transport but logs a warning.
  • HTTP errors: When using the HTTP REST API, non-2xx responses return detailed error messages. Check network connectivity, firewall rules, and SAS token validity.
  • Session handling errors: For session-enabled queues, incorrect session IDs or timeouts may cause failures accepting sessions.

Links and References

Discussion