message-queue-design

Design message queue consumers with idempotency, retry, DLQ, and backpressure rules.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/machenjie/rd-skills --skill message-queue-design-machenjie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: message-queue-design
Source: https://github.com/machenjie/rd-skills/tree/main/src/foundation/capabilities/message-queue-design
Command: npx skills add https://github.com/machenjie/rd-skills --skill message-queue-design-machenjie

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents message-driven systems from breaking under duplicate delivery, delays, failures, retries, dead-letter accumulation, backpressure, replay, and out-of-order processing by enforcing correctness patterns at the consumer and queue-contract level.

Core Features & Use Cases

  • Consumer correctness under at-least-once delivery: Require idempotency keys in message headers/attributes and commit/ack only after durable side effects succeed.
  • Production-grade retry and DLQ design: Define bounded exponential backoff, poison-message handling that won’t block partitions, and DLQ ownership with replay procedures.
  • Ordering, backpressure, and observability: Document ordering scope (partition/key), add backpressure mechanisms, and specify consumer lag metrics and alert thresholds.

Quick Start

Use the message-queue-design skill to create an end-to-end queue and consumer plan for a new or modified worker, including idempotency, retry/DLQ rules, ordering scope, and the exact checklist for safe acknowledgment and monitoring.

Frequently Asked Questions about message-queue-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a message queue consumer for at-least-once delivery?

Designing a message queue consumer for at-least-once delivery requires idempotency keys in message headers and committing acknowledgments only after durable side effects succeed to handle duplicate processing correctly.

What is the best way to handle dead-letter queue accumulation and poison messages?

Handling dead-letter queue accumulation and poison messages requires defining bounded exponential backoff, poison-message handling that avoids blocking partitions, and establishing clear DLQ ownership with replay procedures.

How do I ensure ordering guarantees and manage backpressure in message queues?

Ensuring ordering guarantees and managing backpressure in message queues involves documenting the ordering scope per partition or key and implementing specific backpressure mechanisms to handle varying processing rates.

Why does my message queue consumer break during delayed and failed retries?

Message queue consumers break during delayed and failed retries when lacking bounded exponential backoff retry semantics and proper idempotency-key handling, causing duplicate side effects or partition blocking.

What consumer lag metrics and observability rules do I need for production message queues?

Production message queue observability requires specifying consumer lag metrics, establishing alert thresholds, and enforcing mandatory DLQ and poison-message rules to maintain system resilience under failures.