queue-processing-patterns

Implement queue consumers with idempotency, retry limits, and dead-letter routing.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/oalansilva/crypto --skill queue-processing-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: queue-processing-patterns
Source: https://github.com/oalansilva/crypto/tree/main/.codex/skills/backend/queue-processing-patterns
Command: npx skills add https://github.com/oalansilva/crypto --skill queue-processing-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing reliable background work for distributed systems requires robust queue consumption patterns to prevent duplicate work, data corruption, and cascading failures.

Core Features & Use Cases

  • Define idempotent queue handlers.
  • Configure visibility timeouts, dead-letter routing, and retry limits.
  • Instrument metrics for lag, success/failure rates, and poison message detection.

Quick Start

Configure a minimal worker with a defined idempotency policy, a retry budget, and a dead-letter route to safely process messages.

Frequently Asked Questions about queue-processing-patterns

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

FAQPage Schema
How do I prevent duplicate processing in distributed queue consumers?

Preventing duplicate processing in distributed queue consumers requires implementing explicit idempotency rules. This skill defines idempotency policies that ensure at-least-once message delivery does not result in duplicate work or data corruption.

What is the best way to configure dead-letter routing and visibility timeouts for background workers?

Configuring dead-letter routing and visibility timeouts for background workers involves setting explicit retry limits and failure thresholds. This skill provides patterns to route poison messages safely and control message visibility during processing.

How do I set up retry limits for queue messages to avoid cascading failures?

Setting up retry limits for queue messages prevents cascading failures by defining a strict retry budget. This skill configures graceful failure handling to stop infinite retry loops and redirect unprocessable messages to a dead-letter queue.

How do I collect metrics for queue lag and poison message detection?

Collecting metrics for queue lag and poison message detection requires instrumenting queue handlers with success and failure rate tracking. This skill defines metrics collection to identify processing bottlenecks and isolate unprocessable messages.

When do I need idempotency policies for backend processing workloads?

Idempotency policies for backend processing workloads are needed when distributed systems deliver messages at-least-once. This skill applies to environments where duplicate message delivery could cause data corruption without graceful failure handling.

Why does my queue consumer keep processing the same message repeatedly?

Queue consumers repeatedly processing the same message lack proper visibility timeout control and retry limits. This skill implements dead-letter routing to remove poison messages and idempotency rules to make duplicate processing harmless.