Skip to content
Back to skills

Ops

ASecurity

Set rules for message queues - dead-letter queues, idempotent consumers, retries, at-least-once delivery, ordering and poison pills. Use when you add a consumer, messages are lost or processed twice, or a DLQ fills up.

  • 24 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added October 14, 2026
ai-agentsrustgobackend

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add andreibesleaga/GABBE --skill ops --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ops?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ops
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-ops-f1082693/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-ops-f1082693)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: queue-management
description: Set rules for message queues - dead-letter queues, idempotent consumers, retries, at-least-once delivery, ordering and poison pills. Use when you add a consumer, messages are lost or processed twice, or a DLQ fills up.
triggers: [dead letter queue, idempotent consumer, retry policy for queue, duplicate messages, poison pill message, message ordering]
tags: [ops]
role: eng-backend, ops-sre
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.

For integration with ERP, CRM or legacy systems through queues see `enterprise-integration.skill`.

## Constraints
- Every consumer has a DLQ and an idempotency check.
- No consumer relies on global message order.

## Output Format
The consumer code and configuration, the DLQ and replay procedure in the runbook, and a test with a duplicate message and a poison message.

## Limits and safety
- Replaying or purging a DLQ or production queue is proposed with the exact command and queue name and run only after the human confirms.
- Do not run parsers or tools on quarantined poison messages; inspect them as plain text.
- Put a unique constraint on the message id in the processed-messages table; test two simultaneous deliveries.
- Redact personal data, tokens and financial values from DLQ payloads before quoting or logging them.
- If your broker supports message authentication, use it where untrusted producers can write to the queue.

Files in this skill

  • caching-strategy.skill.md3.9 KB
  • capacity-planning.skill.md3.6 KB
  • cloud-deploy.skill.md3.2 KB
  • configuration-management.skill.md7.6 KB
  • cost-optimization.skill.md2.3 KB
  • decommission-sunset.skill.md6.6 KB
  • dependency-lifecycle.skill.md6.3 KB
  • deployment.skill.md7.8 KB
  • dev-environments.skill.md1.9 KB
  • dev-workflow.skill.md1.8 KB
  • docker-dev.skill.md3.1 KB
  • enterprise-integration.skill.md3.1 KB
  • feature-flag-management.skill.md5.7 KB
  • incident-response.skill.md2.8 KB
  • infra-devops.skill.md3.2 KB
  • k8s-dev.skill.md3.2 KB
  • memory-optimization.skill.md2.9 KB
  • observability-stack-setup.skill.md6.6 KB
  • performance-audit.skill.md7.1 KB
  • performance-optimization.skill.md3.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.