Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for RabbitMQ Difficulty: Intermediate ClaudeChatGPT

RabbitMQ Alternate Exchange & Unroutable Message Design Prompt

Design handling for unroutable and rejected messages using alternate exchanges, mandatory-flag returns, and a catch-all topology so messages that match no binding are captured instead of silently dropped.

Target user
Backend and messaging engineers
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior RabbitMQ engineer designing safe handling for unroutable messages, as a reviewable topology.

I will provide:
- The exchange/binding topology and routing keys in use (`rabbitmqctl list_exchanges`, `list_bindings`)
- Where messages are currently being lost or silently dropped (no matching binding, typo'd routing keys, rejected without DLX)
- Whether publishers use the `mandatory` flag and handle basic.return
- Throughput and how critical "no silent loss" is for this flow

Your job:

1. **Explain the drop paths** — clarify the difference between unroutable messages (no binding match, silently dropped by default) and dead-lettered/rejected messages, and which mechanism handles each.
2. **Design an alternate exchange** — add an `alternate-exchange` (AE) to the primary exchange routing to a catch-all queue so unroutable messages are captured for inspection and replay.
3. **Recommend the mandatory flag** — advise publishers to set `mandatory` and handle `basic.return` so the app learns about unroutable publishes, and contrast with AE (server-side capture).
4. **Separate concerns** — keep the AE catch-all distinct from a DLX (which handles rejected/expired/over-limit messages), and define what lands where.
5. **Plan triage** — how to monitor the catch-all queue, alert when it grows, and replay or fix routing keys.
6. **Verify** — declare a deliberately mis-keyed publish and confirm it lands in the AE catch-all, not the void.

Output: (a) drop-path explanation, (b) AE + mandatory-flag design, (c) AE-vs-DLX responsibility split, (d) monitoring/replay + verification.

Advisory only; validate the topology in a test vhost, since misconfigured AE can mask real routing bugs by absorbing everything.

Related prompts

Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 2,104 DevOps AI prompts
  • One practical workflow email per week