message-queues

Design message-driven architectures with RabbitMQ, Kafka, SQS, and pub/sub patterns.

364|53|Updated May 9, 2026
One-click install
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill message-queues-cosmicstack-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: message-queues
Source: https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/backend/message-queues
Command: npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill message-queues-cosmicstack-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Message queues help you decouple services, smooth traffic spikes, and deliver reliable task and event processing without tightly coupled dependencies.

Core Features & Use Cases

  • Competing Consumers (Work Queues): Distribute tasks across multiple consumers with acknowledgements and retry/DLQ handling, such as background jobs and RPC-like workflows.
  • Pub/Sub & Streaming Patterns: Use broadcast, routing keys, and partitioned event streams for real-time notifications and event-driven architectures.
  • Dead Letter Queues & Operational Safety: Route poison messages to DLQs, then monitor and replay them after fixing systemic issues; design idempotent consumers to safely handle duplicates.

Quick Start

Use this playbook to design a RabbitMQ work queue for background jobs and add a dead letter queue strategy so failed messages can be analyzed and replayed.

Frequently Asked Questions about message-queues

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

FAQPage Schema
How do I design a RabbitMQ work queue for background jobs with dead letter queues?

Design a RabbitMQ work queue by distributing tasks across competing consumers with acknowledgements, then route poison messages to a dead letter queue for safe analysis and replay. This ensures reliable background job processing and operational safety.

How do I handle poison messages and ensure idempotent consumers in event streaming?

Handle poison messages by routing them to a dead letter queue and designing idempotent consumers to safely process duplicates during retries. This approach prevents systemic failures and guarantees reliable event streaming.

When should I use Kafka consumer groups for partitioned ordering versus pub/sub routing?

Use Kafka consumer groups for partitioned event stream ordering when strict sequence matters, and apply pub/sub routing for broadcasting real-time notifications across multiple subscribers. This targets specific event-driven architecture needs.

Can I use SQS and pub/sub patterns for serverless decoupling and traffic spike smoothing?

Yes, you can use SQS and pub/sub patterns for serverless decoupling to smooth traffic spikes and distribute tasks without tightly coupled dependencies. This enables reliable task distribution and asynchronous processing.

What is the best way to monitor consumer lag and queue depth in distributed systems?

Monitor consumer lag and queue depth to track processing backlogs and operational health in distributed systems. This visibility helps identify performance bottlenecks and maintain reliable message-driven architectures.

Why do I need dead letter queues and acknowledgements for reliable task distribution?

Dead letter queues and acknowledgements are required to capture failed messages and confirm successful processing for reliable task distribution. They prevent data loss by ensuring poison messages are safely isolated for later replay.