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
-
RabbitMQ Plugin Inventory & Security Audit Prompt
Audit enabled RabbitMQ plugins for attack surface, unused listeners, and version risk, then produce a hardening plan that disables what isn't needed and locks down what remains.
-
RabbitMQ Dead-Letter Exchange & Retry Design Prompt
Design a dead-letter exchange and retry topology so failed messages are retried with backoff and parked safely instead of being lost or stuck in a poison-message loop.
-
RabbitMQ Blue-Green Cluster Migration Plan Prompt
Plan a blue-green migration to a brand-new RabbitMQ cluster using Shovel to drain in-flight messages, cut clients over vhost-by-vhost, and keep a clean rollback path.
-
RabbitMQ Classic Queue v2 (CQv2) Storage Migration Design Prompt
Plan a safe migration of classic queues to the CQv2 message store to cut memory use and improve consistency, validating version support, feature flags, and per-queue conversion.
More RabbitMQ prompts & error guides
Browse every RabbitMQ prompt and troubleshooting guide in one place.
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.