Skip to content
Skills Library
Programming · Learning & explanation

queue-management

/queue-management

Standards for DLQs (Dead Letter Queues), Idempotency, and Retry policies. Use when: queue management.

Repository
gabbe ↗
Licence
CC-BY-4.0
Last repository change
24.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.

Licence

CC-BY-4.0, otwarta.

What it does and when to use it

Standards for DLQs (Dead Letter Queues), Idempotency, and Retry policies. Use when: queue management.

Original author description

Standards for DLQs (Dead Letter Queues), Idempotency, and Retry policies. Use when: queue management.

How it works

  1. Goal
  2. Steps
  3. 1. Dead Letter Queues (DLQ)
  4. 2. Idempotency
  5. 3. At-Least-Once Delivery
  6. 4. Ordering
  7. 5. Poison Pills
  8. Security & Guardrails
Original SKILL.md headings · 45 lines, 455 words
SKILL.md preview
---
name: queue-management
description: "Standards for DLQs (Dead Letter Queues), Idempotency, and Retry policies. Use when: queue management."
license: CC-BY-SA-4.0
metadata:
  source: "agents/skills/ops/queue-management.skill.md"
  tags: "ops"
  core: "false"
  context_cost: "low"
---
# queue-management Skill

## Goal
Async messaging is powerful but dangerous. Messages must never be lost.

## Steps
## 1. Dead Letter Queues (DLQ)
- **Rule**: Every consumer MUST have a configured DLQ.
- **Behavior**: If a message fails processing N times (Poison Pill), move it to DLQ. Alert `ops-sre`.
- **Replay**: Must have a mechanism to replay messages from DLQ after bug fix.

## 2. Idempotency
- **Rule**: All consumers `handle(msg)` must be idempotent.
- **Pattern**:
  1. Check `processed_messages` table for `msg.id`.
  2. If found, ack and ignore.
  3. If not, process transactionally.
  4. Save `msg.id` to `processed_messages`.

## 3. At-Least-Once Delivery
- Assume you will receive duplicates. Network acks fail. Design for it.

## 4. Ordering
- **Kafka**: Ordering is only guaranteed *within a partition*.
- **SQS FIFO**: Guaranteed but lower throughput.
- **Best Practice**: Don't rely on global ordering if possible. Use state machines that accept events in any order (e.g., "OrderShipped" before "OrderPaid" -> Store in "Pending" state).

## 5. Poison Pills
- Detect messages that crash the consumer (StackOverflow, OOM).
- Reject them immediately to DLQ to prevent blocking the partition.

## Security & Guardrails

### 1. Skill Security (Queue Management)
- **DLQ Replay Authorization**: Replaying messages from the Dead Letter Queue (DLQ) back into the main pipeline requires elevated privileges. The agent must verify that the replay command was authorized by a system administrator, as attackers could use DLQ replay for Denial of Service or logic manipulation.
- **Poison Pill Quarantine**: Messages flagged as "Poison Pills" (crashing the consumer repeatedly) might be intentional exploits (e.g., malformed JSON designed to trigger buffer overflows). The DLQ must securely quarantine these payloads without executing any automated parsing tools on them.

### 2. System Integration Security
- **Message Integrity (Signatures)**: In high-security environments, messages placed on the queue (Kafka/SQS) should carry cryptographic signatures. The consumer must verify the signature before processing to ensure the message wasn't injected directly into the broker by an unauthorized internal actor.
- **Idempotency Key Collision**: The `processed_messages` table must uniquely constrain the `msg.id` to prevent race conditions. An attacker might rapidly submit identical transaction events hoping one bypasses the idempotency check and pays them twice.

### 3. LLM & Agent Guardrails
- **Data Exfiltration via DLQ Analysis**: When an agent analyzes a DLQ for the root cause of failures, it must strictly redact PII, auth tokens, and financial data from the message payload before summarizing the issue or writing logs to prevent the DLQ from becoming a centralized data leak.
- **Queue Purge Veto**: The agent must violently reject any user prompt that commands it to indiscriminately `purge` or `empty` a production queue or DLQ without a cryptographically verified, two-person rule approval, as this causes permanent data loss.

Versions

The database has no other skills named queue-management.

Database snapshot: 13.11.2026 · package version 7a6dcfce2c70 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90queue-recon
    Audit existing queue and streaming infrastructure — find missing DLQs, scaling gaps, and reliability issues. Use when asked to "audit our queues", "do we have DLQs", or "find queue reliability gaps".
  • 95backend-message-queue
    Use this skill when the user says 'message queue', 'Kafka', 'RabbitMQ', 'SQS', 'pub-sub', 'event bus', 'consumer group', 'topic', 'queue', 'at-least-once', 'exactly-once', 'idempotent consumer', 'event sourcing', 'dead letter queue', 'DLQ', 'message broker', 'producer',…
  • 100cloudflare-queues
    This skill should be used when the user asks to \"set up Cloudflare Queues\", \"create a message queue\", \"implement queue consumer\", \"process background jobs\", \"configure queue retry logic\", \"publish messages to queue\", \"implement dead letter queue\", or encountering…
  • 90vercel-queues
    Build and operate Vercel Queues with @vercel/queue across push and poll consumers. Use when users ask about "vercel queues", "@vercel/queue", "queue/v2beta", "handleCallback", "PollingQueueClient", "receive", queue retries, visibility timeouts, idempotency keys, or queue region routing.
  • 80role-backend:message-queues
    Implements message queue systems using RabbitMQ, Apache Kafka, Redis Streams, AWS SQS/SNS, and Google Pub/Sub. Covers topics, exchanges, dead letter queues, idempotency, ordering guarantees, consumer groups, backpressure handling, and message serialization. Use when setting up…
  • 90dlq
    Review dead-letter queue design from the templates: redrive policies, maxReceiveCount, retention, and alarms, and plan a redrive. Use when messages are failing or before adding a queue.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.