MCPInstall
iii-hq/iii avatar

iii-dead-letter-queues

Inspects and redrives jobs that exhausted all retries. Use when handling failed queue jobs, debugging processing errors, or implementing retry strategies.

Installs
178
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/iii-hq/iii --skill iii-dead-letter-queues
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads iii-dead-letter-queues automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Dead Letter Queues

Comparable to: SQS DLQ, RabbitMQ dead-letter exchanges

Key Concepts

Use the concepts below when they fit the task. Not every queue failure needs manual DLQ intervention.

  • Jobs move to a DLQ after exhausting max_retries with exponential backoff (backoff_ms * 2^attempt)
  • Each DLQ entry preserves the original payload, last error, timestamp, and job metadata
  • Redrive via the built-in iii::queue::redrive function or the iii trigger CLI command
  • Redriving resets attempt counters to zero, giving jobs a fresh retry cycle
  • Always investigate and deploy fixes before redriving — blindly redriving repeats failures
  • DLQ support available on Builtin and RabbitMQ adapters

Architecture

A queue consumer fails processing a job. The engine retries with exponential backoff up to max_retries. Once exhausted, the message moves to the DLQ. An operator inspects the failure, deploys a fix, then redrives the DLQ to replay all failed jobs.

iii Primitives Used

PrimitivePurpose
trigger({ function_id: 'iii::queue::redrive', payload: { queue } })Redrive all DLQ jobs for a named queue
trigger({ function_id: 'iii::queue::status', payload: { queue } })Check queue and DLQ status
iii trigger --function-id='iii::queue::redrive' --payload='{"queue":"name"}'CLI redrive command (part of the engine binary)
--timeout-msCLI flag to set trigger timeout (default 30s)
queue_configs in iii-config.yamlConfigure max_retries and backoff_ms

Reference Implementation

See ../references/dead-letter-queues.js for the full working example — inspecting DLQ status,

Also available in Python: ../references/dead-letter-queues.py

Also available in Rust: ../references/dead-letter-queues.rs redriving failed jobs via SDK and CLI, and configuring retry behavior.

Common Patterns

Code using this pattern commonly includes, when relevant:

  • await iii.trigger({ function_id: 'iii::queue::redrive', payload: { queue: 'payment' } }) — redrive via SDK
  • iii trigger --function-id='iii::queue::redrive' --payload='{"queue": "payment"}' — redrive via CLI
  • iii trigger --function-id='iii::queue::redrive' --payload='{"queue": "payment"}' --timeout-ms=60000 — with custom timeout
  • Redrive returns { queue: 'payment', redriven: 12 } indicating count of replayed jobs
  • Inspect in RabbitMQ UI at http://localhost:15672, find iii.__fn_queue::{name}::dlq.queue
  • Best practice: investigate failures, deploy fix, then redrive
  • Monitor DLQ depth as an operational alert signal

Adapting This Pattern

Use the adaptations below when they apply to the task.

  • Set max_retries and backoff_ms in queue_configs based on your failure tolerance
  • Build an admin endpoint that calls iii::queue::redrive for operational control
  • Use iii::queue::status to check DLQ depth before and after redriving
  • For dev/test, use lower retry counts to surface failures faster
  • In production with RabbitMQ, use the management UI for detailed message inspection
  • Consider building an alerting function that triggers on DLQ depth thresholds

Engine Configuration

Queue max_retries and backoff_ms are set per queue in iii-config.yaml under queue_configs. See ../references/iii-config.yaml for the full annotated config reference.

Pattern Boundaries

  • For queue processing patterns (enqueue, concurrency, FIFO), prefer iii-queue-processing.
  • For queue configuration (retries, backoff, adapters), prefer iii-engine-config.
  • For function registration and triggers, prefer iii-functions-and-triggers.
  • Stay with iii-dead-letter-queues when the primary problem is inspecting or redriving failed jobs.

When to Use

  • Use this skill when the task is primarily about iii-dead-letter-queues in the iii engine.
  • Triggers when the request directly asks for this pattern or an equivalent implementation.

Boundaries

  • Never use this skill as a generic fallback for unrelated tasks.
  • You must not apply this skill when a more specific iii skill is a better fit.
  • Always verify environment and safety constraints before applying examples from this skill.

FAQ

What does the iii-dead-letter-queues skill do?

Inspects and redrives jobs that exhausted all retries. Use when handling failed queue jobs, debugging processing errors, or implementing retry strategies.

How do I install iii-dead-letter-queues?

Run npx skills add https://github.com/iii-hq/iii --skill iii-dead-letter-queues in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/iii-dead-letter-queues/ (personal) or .claude/skills/iii-dead-letter-queues/ (project).

Which AI agents can use iii-dead-letter-queues?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is iii-dead-letter-queues safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains iii-dead-letter-queues?

It is published by iii-hq/iii in iii-hq/iii. It has 178 recorded installs.

More from iii-hq/iii

View all →

Configure a managed iii engine through worker-compose.yaml or a directly supervised engine through config.yaml. Use for engine ports, RBAC via the rbac-proxy worker, observer limits, streams, sandboxes, and configuration storage.

5.5K installs

Install the iii engine, set up your first worker, and get a working backend running. Use when a user wants to start a new iii project, install the SDK, or needs help with initial setup and configuration.

Backend & APIs5.5K installs

Handle iii engine and SDK errors across Node, Python, Rust, and browser workers. Use when interpreting error codes, retryability, RBAC denial, timeouts, handler failures, or SDK-specific exception surfaces.

Backend & APIs5.3K installs

Use when composing iii primitives into backend architectures: durable workflows, reactive backends, observer side effects, agentic pipelines, event-driven CQRS, effect pipelines, and trigger-transform-action automation.

Use when working with iii SDK APIs across Node.js, browser, Python, Rust, or Go: package installation, worker initialization, function/trigger registration, observers, invocation, local dispatch, channels, logging, OpenTelemetry, and language-specific caveats.

Backend & APIs5.2K installs

Use when registering iii functions, binding triggers, observing functions, selecting sync/void/enqueue invocation, creating workers, inspecting the live worker registry, installing registry workers, authoring event sources, moving channel data, or adapting external HTTP functions across TypeScript, Python, and Rust.

Backend & APIs5.2K installs

Popular code quality & workflow skills

View category →
mattpocock avatar

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

mattpocock avatar

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

mattpocock avatar

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

mattpocock avatar

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

mattpocock avatar

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.