CQRS Query icon

CQRS Query

Query

Custom

AI-generated

Summary

Send a custom query message to a RabbitMQ exchange with a routing key composed of a configurable prefix and a user-defined pattern, optionally waiting for and processing a reply.

Inputs

  • routingKeyPrefix — String prefix added before the custom pattern separated by a dot to form the routing key.
  • pattern (required) — Pattern suffix used with the routingKeyPrefix to create the full routing key for the message.
  • payload (required) — The JSON payload to send as the message content.
  • replyQueue — Boolean to indicate if the node should wait for a reply message on the RabbitMQ direct reply-to queue.
  • exchange — The name of the RabbitMQ exchange to publish the message to. Defaults to 'cqrs'.
  • options — Additional AMQP options for publishing such as alternate exchange, arguments, headers, durable, and auto-delete flags.
  • spread — Boolean to spread each item in an array response into separate output items if true.

Output shape

a list of items, each representing the response or status for the corresponding input item

Each output item corresponds to an input item. If replyQueue is enabled, the node waits for the correlated reply message and returns its parsed JSON content. If the response is an array and 'spread' is true, the array elements are output as individual n8n items. If no reply is received or an error occurs, the output item records the error or publishes a success confirmation with correlationId. The node handles multiple input items in parallel.

Links

Discussion