Configure a RabbitMQ alternate exchange to capture unroutable messages instead of silently dropping them

domain: rabbitmq.com · 6 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗

Verified steps

  1. Create a dedicated exchange (commonly a fanout) that will act as the alternate exchange (AE), and bind a queue to it to collect unroutable messages
  2. Configure the alternate-exchange argument on your primary exchange, either at exchange.declare time (arguments table key 'alternate-exchange' with the AE's name as value) or via a policy targeting the exchange
  3. When arguments and policy both specify an AE for the same exchange, the argument value takes precedence over the policy value
  4. Publish a test message with a routing key that matches no bindings on the primary exchange and confirm it is delegated to the AE and lands in the collector queue
  5. If a message is routed via the AE, it still counts as 'routed' for the purposes of the publisher's mandatory flag, so publisher-confirms-based unroutable detection alone won't catch it
  6. Chain AEs across multiple exchanges if you want a shared, centralized unroutable-message sink for several primary exchanges

Known gotchas

Related routes

Configure RabbitMQ dead-letter exchanges for failed messages
rabbitmq.com · 5 steps · unrated
Publish messages to RabbitMQ reliably using publisher confirms and configure consumers with prefetch and a dead-letter exchange
rabbitmq · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans