Skip to main content
Version: Next
input/amqp09INPUTBUFFERPROCESSOROUTPUT

AMQP 0.9 (RabbitMQ)

The AMQP 0.9 input consumes messages from an AMQP 0.9/0.9.1 broker such as RabbitMQ. As a channel-based input it follows the engine's cancellation-safety contract: dropping a pending read never loses an already-decoded message (see Input Delivery Semantics).

Configuration​

FieldTypeRequiredDefaultDescription
typestringyes—Constant value "amqp09"
urlstringyes—AMQP broker URL, e.g. amqp://guest:guest@localhost:5672/%2f or amqps://...
queuestringyes—Queue name to consume from
exchangestringno—Optional exchange name; when set, binds queue to this exchange
exchange_typestringnodirectExchange type when declaring an exchange (direct, fanout, topic, headers)
routing_keystringno""Routing key used when binding queue to exchange
declare_queuebooleannofalseDeclare the queue if it does not already exist
declare_exchangebooleannofalseDeclare the exchange if it does not already exist (requires a non-empty exchange)
durablebooleannotrueMark declared exchange/queue as durable
auto_deletebooleannofalseAuto-delete declared exchange/queue when unused
exclusivebooleannofalseDeclare the queue as exclusive to this connection
consumer_tagstringno""Consumer tag identifying this consumer (empty lets the broker assign one)
auto_ackbooleannofalseAutomatically acknowledge deliveries on receipt; when false, acknowledgements are sent after downstream processing completes
prefetch_countintegerno256Per-channel QoS prefetch limit on unacknowledged in-flight deliveries (0–65535; does not cap messages queued on the broker). Defaults to 256; 0 means unlimited, and the limit does not apply when auto_ack is true

Examples​

Topic exchange with manual acknowledgement​

input:
type: "amqp09"
url: "amqp://guest:guest@localhost:5672/%2f"
queue: "orders-in"
exchange: "orders"
exchange_type: "topic"
routing_key: "orders.#"
declare_exchange: true
declare_queue: true
durable: true
auto_ack: false
prefetch_count: 64

Fanout exchange​

input:
type: "amqp09"
url: "amqp://guest:guest@localhost:5672/%2f"
queue: "audit-log"
exchange: "events-fanout"
exchange_type: "fanout"
declare_exchange: true
declare_queue: true

TLS​

Use an amqps:// URL scheme to connect over TLS (for example amqps://user:pass@broker.example.com:5671/%2f). The client negotiates TLS natively via rustls using system root certificates.

Read errors​

If the AMQP consumer stream ends abnormally or returns a delivery error, the input emits Disconnection so the engine reconnects rather than terminating the job as EOF.