CQRS Command icon

CQRS Command

Command

Custom

AI-generated

Summary

Publish a command message with a custom routing key pattern to a RabbitMQ exchange and optionally wait for a reply message, returning the response or success confirmation.

Inputs

  • routingKeyPrefix — String prefix added before the custom pattern in the routing key, separated by a dot. Defaults to 'command'.
  • pattern (required) — Custom routing pattern suffix appended after the prefix to form the routing key.
  • payload (required) — JSON payload to send as the command message content.
  • replyQueue — Boolean indicating whether to wait for a reply message on the RabbitMQ reply-to queue. Defaults to true.
  • exchange — Name of the RabbitMQ exchange to publish messages to. Defaults to 'cqrs'.
  • options — Collection of publishing options including alternate exchange, queue durability, headers, and others that configure message delivery.
  • spread — Boolean indicating if an array response should be split into multiple individual items in output. Defaults to false.

Output shape

a list of items corresponding to each input item, each containing either the received reply message parsed as JSON or a confirmation with the correlation ID and success status when no reply is requested or reply not received

If 'Wait for Reply' is true, the node waits for a matching reply message correlated by the correlation ID and parses the JSON reply to produce the output; if 'Spread Response' is enabled and the reply is an array or contains a 'rows' array, results are spread into multiple output items. If no reply is waited for, the node outputs success info for each published message. Errors in reply messages propagate as node execution errors.

Links

Discussion