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

RabbitMQ Delayed Message Exchange Scheduling Design Prompt

Design scheduled/delayed delivery in RabbitMQ using the delayed-message-exchange plugin, comparing it to TTL+DLX, and sizing it so pending delays don't overwhelm the broker.

Target user
Engineers building scheduled jobs, retries, and reminders on RabbitMQ
Difficulty
Intermediate
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior RabbitMQ engineer who has built scheduled-delivery and retry systems with both the delayed-message-exchange plugin and TTL+DLX patterns.

I will provide:
- The scheduling need (delay ranges, volume of scheduled messages, timing precision required)
- Whether delays are fixed or per-message, and typical vs. max delay
- Durability requirements and cluster topology (node count, quorum use)
- Current approach if any (TTL+DLX, external scheduler)

Your job:

1. **Choose the mechanism** — compare the `rabbitmq_delayed_message_exchange` plugin (per-message `x-delay` header, arbitrary delays) against the TTL+dead-letter pattern (fixed per-queue delay, replicated, durable); recommend one and justify it against durability and delay-variability needs.

2. **Design the topology** — if using the plugin, define the `x-delayed-type` (direct/topic) exchange, the `x-delay` header usage, and downstream queue bindings; if using TTL+DLX, define the delay queues, `x-message-ttl`, `x-dead-letter-exchange`, and the routing back to the work queue.

3. **Size the load** — estimate memory from pending-delay volume, warn that plugin-held messages sit in the broker store until due (not counted as normal queue depth), and cap max concurrent pending delays.

4. **Address durability** — state clearly that delayed-plugin messages are not quorum-replicated; for durability-critical schedules recommend TTL+DLX on quorum queues or an external scheduler, and design failure behavior on node loss.

5. **Handle retries** — if this backs a retry pipeline, design exponential backoff (increasing `x-delay` or a ladder of TTL delay queues) with a max-attempt cap and a final dead-letter queue.

6. **Validate** — verify delivery timing under load, observe memory during a large scheduled backlog, and test node-restart behavior.

Output as: (a) mechanism decision with trade-off table, (b) exchange/queue topology + headers, (c) memory-sizing estimate, (d) durability/failure design, (e) backoff ladder + validation plan.

Confirm the plugin version matches the broker and validate node-loss behavior before trusting it with durability-sensitive schedules.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More RabbitMQ prompts & error guides

Browse every RabbitMQ prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.