Reference · Tools

RabbitMQ

Publish messages to RabbitMQ queues and exchanges via the AMQP 0-9-1 protocol. Supports sending JSON, text, or binary data as message content.

Action (binary) Development v1 Binary data

The RabbitMQ node publishes messages to queues and exchanges over AMQP 0-9-1, carrying JSON, plain text or binary content. A typical build is emitting a job onto a queue for a worker service to pick up, decoupling the workflow from whatever processes the result.

Node type
Action (binary)
Parameters
12
Outputs
Output, Error
Credentials
RabbitMQ

RabbitMQ

Publish messages to RabbitMQ queues and exchanges

Overview

The RabbitMQ tool connects to an AMQP 0-9-1 broker (RabbitMQ) and publishes messages. It supports two modes: (1) Queue mode sends messages directly to a named queue using channel.sendToQueue(); (2) Exchange mode publishes to a named exchange with a routing key using channel.publish(). Exchange types supported: direct, topic, headers, fanout. Message content can be the entire input JSON (sendInputData=true), a custom string, or binary data from an upstream node. When binaryData is enabled, the tool reads binary content from the specified binary property and sends the raw bytes as the message body. AMQP headers and publish arguments are configurable via fixedCollection parameters. Queue/exchange options include durable, autoDelete, exclusive, assertQueue/assertExchange. Uses the amqplib npm package.

Category: Development
Tool Name: rabbitmq
Version: 1

Appearance: Icon: si-rabbitmq | Color: #FF6600

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires RabbitMQ credentials. See the Credentials Guide for setup instructions.

Operations

OperationValueDescription
Send a Message to RabbitMQsendMessagePublish a message to a queue or exchange
Delete From QueuedeleteMessageThis operation is a pass-through — RabbitMQ ack/nack requires a consumer channel which this tool does not implement.

Parameters

Delete From Queue takes no parameters of its own — see All Operations.

Send a Message to RabbitMQ (sendMessage)

ParameterTypeRequiredDefaultDescription
ModeoptionsNoqueueWhether to send to a queue directly or publish to an exchange.
Options: queue (publish data to a queue), exchange (publish data to an exchange)
Queue / TopicstringYesName of the queue to publish to. Supports expressions like {{ $json.queue }}. (shown when Mode is queue)
ExchangestringYesName of the exchange to publish to. Supports expressions like {{ $json.exchange }}. (shown when Mode is exchange)
TypeoptionsNofanoutType of exchange. (shown when Mode is exchange)
Options: direct (exact routing-key match), topic (routing-key patterns), headers (routes on header attributes), fanout (broadcasts to every bound queue)
Routing KeystringNoThe routing key for the message. Supports expressions like {{ $json.routingKey }}. (shown when Mode is exchange)
Send Input DatabooleanNotrueWhether to send the entire input JSON as the message body.
MessagestringNoThe message body to send. Used when Send Input Data is false and Binary Data is false. Supports expressions like {{ $json.text }}. (shown when Send Input Data is false)
Binary DatabooleanNofalseWhether to send binary data from the input item as the message content. (shown when Send Input Data is false)
Binary PropertystringNodataName of the binary property to read message content from. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. (shown when Binary Data is true and Send Input Data is false)
OptionscollectionNo{}Additional AMQP queue, exchange and message options.
— Alternate ExchangestringNoAn exchange to send messages to if this exchange cannot route them to any queues. (shown when Mode is exchange)
— ArgumentsfixedCollectionNo{}Additional amqplib publish arguments (e.g., expiration, messageId, correlationId).
— — KeystringNoThe argument name.
— — ValuestringNoThe argument value.
— Assert ExchangebooleanNotrueWhether to assert the exchange exists before publishing. If false, checkExchange is used instead. (shown when Mode is exchange)
— Assert QueuebooleanNotrueWhether to assert the queue exists before sending. If false, checkQueue is used instead. (shown when Mode is queue)
— Auto Delete QueuebooleanNofalseWhether the queue will be deleted when the number of consumers drops to zero.
— DurablebooleanNotrueWhether the queue/exchange will survive broker restarts.
— ExclusivebooleanNofalseWhether to scope the queue to the connection. (shown when Mode is queue)
— HeadersfixedCollectionNo{}AMQP headers to include with the message.
— — KeystringNoThe header name.
— — ValuestringNoThe header value.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

One output item per input item — neither operation fans out. Binary data is forwarded unchanged in both cases.

  • sendMessage — the output item JSON replaces the input item JSON with a fixed confirmation object. Upstream fields do not pass through, so capture anything you still need before this node.
{
  "success": true
}
  • deleteMessage — a pure pass-through. The input item JSON is emitted unchanged and no broker call is made.

The publish waits for the broker to acknowledge each message before the item is written, so an item on the Output port means the broker accepted it. Messages are published as persistent, and the message’s content type is set from how you supplied the body: application/json for Send Input Data, the binary property’s own MIME type for Binary Data, and text/plain for a custom Message.

Usage Examples

  • Send a JSON message to a RabbitMQ queue
  • Publish a message to a topic exchange with a routing key
  • Send binary file content as a RabbitMQ message
  • Publish workflow data to a fanout exchange

Example Configuration

Send each incoming item to a durable work queue:

{
  "type": "rabbitmq",
  "parameters": {
    "operation": "sendMessage",
    "mode": "queue",
    "queue": "work-queue",
    "sendInputData": true,
    "options": {
      "durable": true,
      "assertQueue": true
    }
  }
}

Route log events through a topic exchange, choosing the routing key per item:

{
  "type": "rabbitmq",
  "parameters": {
    "operation": "sendMessage",
    "mode": "exchange",
    "exchange": "logs",
    "exchangeType": "topic",
    "routingKey": "app.{{ $json.severity }}",
    "sendInputData": true,
    "options": {
      "durable": true,
      "assertExchange": true
    }
  }
}

Broadcast a fixed announcement to every bound queue:

{
  "type": "rabbitmq",
  "parameters": {
    "operation": "sendMessage",
    "mode": "exchange",
    "exchange": "notifications",
    "exchangeType": "fanout",
    "routingKey": "",
    "sendInputData": false,
    "message": "System maintenance scheduled",
    "options": {
      "durable": false,
      "assertExchange": true
    }
  }
}

Publish a file from an upstream node, with headers and a TTL argument:

{
  "type": "rabbitmq",
  "parameters": {
    "operation": "sendMessage",
    "mode": "queue",
    "queue": "file-uploads",
    "sendInputData": false,
    "binaryData": true,
    "binaryPropertyName": "data",
    "options": {
      "durable": true,
      "assertQueue": true,
      "headers": {
        "header": [
          { "key": "source", "value": "workflow" }
        ]
      },
      "arguments": {
        "argument": [
          { "key": "expiration", "value": "60000" }
        ]
      }
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Publish messages (JSON, text, or binary) to RabbitMQ queues or exchanges via AMQP 0-9-1.

Frequently asked questions

Which AMQP version does it use?

0-9-1, RabbitMQ's native protocol. That is different from the AMQP Sender node, which speaks AMQP 1.0 and targets brokers like ActiveMQ and Azure Service Bus.

Can it send binary payloads?

Yes — JSON, text and binary are all supported as message content, so a file produced upstream can be published directly.

What is the difference between a queue and an exchange?

A queue holds messages for consumers; an exchange routes them to queues by its own rules. Publishing to an exchange is the right choice when routing should be decided by the broker.

Which credential does it need?

A RabbitMQ credential with the broker connection details.

Build with the RabbitMQ node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need RabbitMQ credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.