Queue / Topic Consumer
Consumes messages from an external Message Queue or Pub/Sub Topic.
Entry node for queue-driven workflows. It reshapes the run's input into { message_id, queue, content, attributes } and rejects messages from another queue than subscription; in this version no broker consumer starts it.
This trigger connects to external brokers (like RabbitMQ, Kafka, SQS, or Redis) and initiates a workflow instance for each incoming message.
Key Features:
- Backpressure: Supports
prefetchto limit concurrent workflow instantiations. - Reliability: Supports Auto or Manual Acknowledgement (Ack/Nack) to ensure message delivery guarantees.
Use Cases:
- Processing tasks offloaded from a main web server.
- Event-driven architecture integrating with legacy systems.
How it works
- What starts it: no backend component consumes a broker for this node in this version. The workflow runs when it is started explicitly with a message-shaped input
{ message_id, queue, content, attributes }. - Resolves the node config. When
subscriptionis set and the input'squeueis set and different, it returnserror. - Otherwise outputs
message_id(defaultunknown),queue(the input's, orsubscription),content(the input'scontent, or the whole input) andattributes(default{}).
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-orders-queue",
"label": "Orders queue",
"operator_slug": "queue.trigger",
"operator_version": "1.0.0",
"config": {
"source": "pi-credential-xxxx",
"subscription": "orders.created",
"prefetch": 10,
"ack_mode": "auto"
}
}{
"ok": true,
"data": {
"message_id": "msg-7f3a9c",
"queue": "orders.created",
"content": {
"order_id": "ord_123",
"total": 129.99
},
"attributes": {
"content-type": "application/json"
}
},
"port": "out"
}Configuration
-
sourcestring Required -
Resource ID of the message broker connection.
-
subscriptionstring Required -
The specific channel to listen to.
-
prefetchinteger Optional -
Max unacknowledged messages.
-
ack_modestring Optional -
Auto: Ack on workflow start. Manual: Requires specific app to Ack.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
source - Declared and required, but not read.
prefetchandack_modeare not read either: no message is acknowledged by this node. -
subscription - Only used to reject messages from another queue and as the default
queuein the output.
Output ports
out default The message is accepted.
{
"message_id": "msg-7f3a9c",
"queue": "orders.created",
"content": {
"order_id": "ord_123",
"total": 129.99
},
"attributes": {
"content-type": "application/json"
}
}error The input's queue differs from subscription. The output is the envelope { ok, errors, port }.
{
"ok": false,
"errors": [
"Queue mismatch: orders.created is not equal to orders.cancelled"
],
"port": "error"
}In expressions
What a later node can read from this node's output with $("Queue / Topic Consumer").item.json.<path> (write your node's label instead of Queue / Topic Consumer). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Queue / Topic Consumer").item.json.message_id | ||
$("Queue / Topic Consumer").item.json.queue | ||
$("Queue / Topic Consumer").item.json.contentThe message body. | ||
$("Queue / Topic Consumer").item.json.attributesMessage headers/metadata. | ||
$("Queue / Topic Consumer").item.json.content.order_id | — | |
$("Queue / Topic Consumer").item.json.content.total | — | |
$("Queue / Topic Consumer").item.json.attributes.content-type | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Queue mismatch: <subscription> is not equal to <queue> | error | The workflow was started with a message from another queue. |
Output contract
-
message_idstring Optional -
queuestring Optional -
contentobject Optional -
The message body.
-
attributesobject Optional -
Message headers/metadata.
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "queue.trigger",
"name": "Queue / Topic Consumer",
"category": "triggers",
"version": "1.0.0",
"description": "Consumes messages from an external Message Queue or Pub/Sub Topic.\n\n This trigger connects to external brokers (like RabbitMQ, Kafka, SQS, or Redis) and initiates a workflow instance for each incoming message.\n\n **Key Features:**\n - **Backpressure:** Supports `prefetch` to limit concurrent workflow instantiations.\n - **Reliability:** Supports Auto or Manual Acknowledgement (Ack/Nack) to ensure message delivery guarantees.\n\n **Use Cases:**\n - Processing tasks offloaded from a main web server.\n - Event-driven architecture integrating with legacy systems.",
"capabilities": [
"queue-consumer",
"high-throughput",
"async-processing"
],
"config_schema": {
"type": "object",
"required": [
"source",
"subscription"
],
"properties": {
"source": {
"type": "string",
"title": "Connection / Broker",
"description": "Resource ID of the message broker connection."
},
"subscription": {
"type": "string",
"title": "Queue Name / Topic",
"description": "The specific channel to listen to."
},
"prefetch": {
"type": "integer",
"default": 10,
"title": "Prefetch Count",
"description": "Max unacknowledged messages."
},
"ack_mode": {
"type": "string",
"enum": [
"auto",
"manual"
],
"default": "auto",
"title": "Ack Mode",
"description": "Auto: Ack on workflow start. Manual: Requires specific app to Ack."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": null,
"output_contract_schema": {
"type": "object",
"properties": {
"message_id": {
"type": "string"
},
"queue": {
"type": "string"
},
"content": {
"type": "object",
"description": "The message body."
},
"attributes": {
"type": "object",
"description": "Message headers/metadata."
}
}
},
"ports": [
{
"port_id": "out",
"label": "Message Received",
"is_default": true
},
{
"port_id": "error",
"label": "Error"
}
],
"execution_mode": "async",
"tags": [
"queue",
"consumer",
"kafka",
"rabbitmq"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"required": [
"source",
"subscription"
],
"properties": {
"source": {
"type": "string",
"title": "Connection / Broker",
"description": "Resource ID of the message broker connection."
},
"subscription": {
"type": "string",
"title": "Queue Name / Topic",
"description": "The specific channel to listen to."
},
"prefetch": {
"type": "integer",
"default": 10,
"title": "Prefetch Count",
"description": "Max unacknowledged messages."
},
"ack_mode": {
"type": "string",
"enum": [
"auto",
"manual"
],
"default": "auto",
"title": "Ack Mode",
"description": "Auto: Ack on workflow start. Manual: Requires specific app to Ack."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"message_id": {
"type": "string"
},
"queue": {
"type": "string"
},
"content": {
"type": "object",
"description": "The message body."
},
"attributes": {
"type": "object",
"description": "Message headers/metadata."
}
}
}[
{
"port_id": "out",
"label": "Message Received",
"is_default": true
},
{
"port_id": "error",
"label": "Error"
}
]Execution
- Execution
async- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
queue-consumerhigh-throughputasync-processing- Tags
queueconsumerkafkarabbitmq
Notes and limits
- When the input has no
content, the whole input (including any$trigger_statethe backend adds) becomescontent. - With sample data the engine skips the node and passes the sample input on
outunchanged.
Reviewed against the orchestrator code · 31e874b · 2026-11-26