RabbitMQ (AMQP)
Publishes to or consumes from a RabbitMQ queue over the AMQP 0-9-1 protocol.
URL format
rabbitmq://[user:pass@]host[:port]/<vhost>?queue=<name>
amqp:///amqps:// (the native AMQP scheme) and rabbitmq:///
rabbitmqs:// (an alias) are both accepted; rabbitmq(s) is rewritten to
amqp(s) before being handed to the driver. The default vhost / must be
percent-encoded as %2f in the URL path, per the AMQP URI spec.
Examples
Consume a queue and forward each message to an HTTP endpoint, continuous:
mq-bridge-app copy \
--from rabbitmq://guest:guest@localhost:5672/%2f?queue=orders \
--to http://internal-api.local/ingest?method=POST
Publish to an exchange instead of a default-exchange queue:
mq-bridge-app copy --drain \
--from file:///data/events.jsonl?format=json \
--to 'amqp://guest:guest@localhost:5672/%2f?exchange=events&queue=events'
Fan-out subscriber mode (ephemeral queue bound to the exchange):
mq-bridge-app copy \
--from 'amqp://guest:guest@localhost:5672/%2f?exchange=events&subscribe_mode=true' \
--to kafka://kafka.local:9092?topic=events
Key options
| Option | Purpose |
|---|---|
queue | Queue to consume from / publish to. |
exchange | Exchange to publish to or bind the queue to. |
subscribe_mode | Consumer-only: fan-out (ephemeral queue) instead of point-to-point. |
prefetch_count | Consumer-only: messages to prefetch. Defaults to 100. |
no_persistence | Non-durable queues / non-persistent messages. |
Full field list: reference/rabbitmq.md.