Back to Zeroclaw

AMQP

docs/book/src/channels/amqp.md

0.8.32.1 KB
Original Source

AMQP

The amqp channel consumes messages from an AMQP 0-9-1 broker (RabbitMQ and compatible). Each delivery can drive the agent loop, start a SOP run, or both, selected per alias by the dispatch field.

This is a SOP event source. For trigger syntax, routing-key matching, and the SOP side of the wiring, see SOP Fan-In: AMQP. This page covers the broker connection and the dispatch mode.

Configuration

The full field list, derived from the live schema. For a basic consumer you set amqp_url, exchange, and routing_keys.

{{#config-fields channels.amqp}}

Full field reference: config reference.

Dispatch modes

The dispatch field decides what a delivery does:

  • agent_loop (default): the delivery is handed to the agent loop as a message. This preserves the original behavior; existing consumers are unaffected.
  • sop: the delivery is lifted into a SOP event (routing key into the event topic, body into the payload) and dispatched to the SOP engine. See SOP Fan-In: AMQP.
  • sop_and_agent_loop: both of the above run for each delivery.

TLS

For TLS transport, point amqp_url at an amqps:// endpoint and supply ca_cert. For mutual TLS, also set client_cert and client_key. Without these, the connection is plaintext; do not expose a plaintext consumer across an untrusted network.

Troubleshooting

SymptomLikely causeFix
No messages consumedexchange or routing keys do not match the publisherVerify exchange and routing_keys against what the publisher emits
TLS handshake failsamqps:// without ca_cert, or a cert and key mismatchSupply ca_cert; for mTLS verify client_cert and client_key pair
Deliveries arrive but no SOP startsdispatch is agent_loop, or the SOP trigger does not matchSet dispatch to sop or sop_and_agent_loop; check the trigger routing key

See also