using-message-queues

Implement asynchronous messaging with Kafka, RabbitMQ, NATS, Redis Streams, Celery, BullMQ, and Temporal.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/masermediagroup-stack/maser-media --skill using-message-queues-masermediagroup-stack
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-message-queues
Source: https://github.com/masermediagroup-stack/maser-media/tree/main/.cursor/skills/community/ai-design-components/skills/using-message-queues
Command: npx skills add https://github.com/masermediagroup-stack/maser-media --skill using-message-queues-masermediagroup-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires confluent-kafka, and includes scripts (resource) and references (resource) components.

What problem does it solve? Long-running operations block HTTP requests, tightly coupled services fail together, and failed background jobs disappear silently. This Skill provides decision guidance and working patterns for building event-driven architectures, background job processing, and service decoupling with the right message broker. ## Core Features & Use Cases - Broker Selection Decision Tree: Choose between Kafka (event streaming, 500K+ msg/s), RabbitMQ (complex routing), NATS (request-reply, sub-ms latency), Redis Streams (simple queues), Celery/BullMQ (task queues), and Temporal (durable workflows and sagas). - Production Patterns: Dead letter queues, idempotent consumers, exponential backoff retries, event sourcing, CQRS, transactional outbox, and saga compensation with code examples in Python and TypeScript. - Frontend Integration: Server-Sent Events endpoints and React components for real-time job status updates. - Use Case: An order processing system needs to charge payments, reserve inventory, and send confirmations without blocking checkout. Use the Temporal saga pattern with compensating transactions, or enqueue Celery tasks with DLQ handling and monitor progress via SSE. ## Quick Start Ask the AI to set up a background job queue with Celery and Redis for processing image uploads, including retry logic and a dead letter queue.

Frequently Asked Questions about using-message-queues

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

FAQPage Schema
How do I choose between Kafka, RabbitMQ, and Redis for message queues?▼

Choose Kafka for event streaming and log aggregation at 500K+ msg/s with replay capability. Choose RabbitMQ for complex routing with exchanges and dead letter support. Choose Redis Streams for simple queues when you already run Redis and need moderate throughput.

How do I process background jobs in Python without blocking API requests?▼

Use Celery with Redis as the broker: define tasks with the @app.task decorator, enqueue them from your API endpoint with .delay(), and return a task ID immediately. Clients poll a status endpoint or receive updates via Server-Sent Events.

What is the difference between Celery and Temporal for workflows?▼

Celery handles simple background tasks and periodic jobs with retries, while Temporal provides durable workflow execution that survives restarts, supports saga patterns with compensation, and handles human-in-the-loop processes. Use Temporal for multi-step distributed transactions.

How do I prevent duplicate message processing in consumers?▼

Implement idempotency by storing processed message IDs in Redis with a TTL and checking before processing. For Kafka, enable idempotent producers and manual offset commits after successful processing to achieve exactly-once semantics.

When should I not use Kafka for messaging?▼

Avoid Kafka for request-reply patterns since it is asynchronous and lacks response correlation; use NATS or gRPC instead. It is also overkill for simple background job queues where Celery or BullMQ with Redis is simpler to operate.

How do I handle failed messages after max retries?▼

Route failed messages to a dead letter queue after exhausting retries, then commit the offset so the message is not redelivered. Monitor DLQ depth with alerts and provide a runbook for manual inspection and replay of failed messages.