rc-resilience

Design idempotency, retry, DLQ, and circuit breaker patterns for event-driven distributed systems.

19|1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/rodolfochicone/rc-project --skill rc-resilience-rodolfochicone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rc-resilience
Source: https://github.com/rodolfochicone/rc-project/tree/main/skills/misc/rc-resilience
Command: npx skills add https://github.com/rodolfochicone/rc-project --skill rc-resilience-rodolfochicone

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Distributed systems built on SQS, EventBridge, and Lambda fail in predictable ways — duplicate deliveries, poison messages, retry storms, and dead dependencies — and this Skill provides concrete design guides so producers and consumers handle those failures instead of losing data silently. ## Core Features & Use Cases - Idempotency and Deduplication: Classify operations (SET/PUT vs INCREMENT/external side effects), choose business-level idempotency keys, and implement a conditional-write store with TTL. - Timeouts, Retries, and Circuit Breakers: Set explicit per-hop timeouts, classify retryable vs non-retryable errors, apply exponential backoff with jitter, and add circuit breakers and bulkheads for shared dependencies. - DLQ and Poison Message Handling: Configure DLQs with maxReceiveCount, alarm on queue depth, perform safe redrive after root-cause fixes, and use ReportBatchItemFailures for partial batch failures. - Use Case: When reviewing a Lambda consumer of an SQS queue, apply the checklists to verify the queue has a DLQ, the consumer is idempotent, and batch failures report only failed items. ## Quick Start Ask the assistant to review the resilience of an SQS consumer Lambda, covering idempotency keys, retry policy, and DLQ configuration.

Frequently Asked Questions about rc-resilience

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

FAQPage Schema
How do I make an SQS consumer idempotent?▼

Make an SQS consumer idempotent by deriving a business-level key (such as order ID plus event type) and writing it to a store like DynamoDB with a conditional put that fails if the key exists. Set a TTL covering DLQ redrive windows, not just the visibility timeout.

How do I configure a dead-letter queue for SQS?▼

Configure a DLQ by setting a redrive policy with maxReceiveCount on the source queue so poison messages move automatically after N failed receives. Add a CloudWatch alarm on the DLQ depth and only redrive after fixing the root cause and confirming consumer idempotency.

What is the difference between retryable and non-retryable errors?▼

Retryable errors include 5xx responses, 429 throttling, timeouts, and transient network failures, while non-retryable errors include 4xx validation failures, 401/403 auth errors, and 404s. Retrying non-retryable errors only delays failure and wastes the retry budget.

Does SQS FIFO provide exactly-once delivery?▼

SQS FIFO provides at-least-once delivery plus deduplication within a 5-minute window via MessageDeduplicationId, not true exactly-once. End-to-end exactly-once semantics require idempotency in the consumer, since FIFO does not cover DLQ replays or cross-system duplicates.

Why does my Lambda reprocess the entire SQS batch when one message fails?▼

By default, a Lambda exception marks the whole SQS batch as failed, reprocessing messages that already succeeded. Enable ReportBatchItemFailures and return only the failed messageIds in batchItemFailures so successful items are not redelivered.

When should I use a circuit breaker instead of just retries?▼

Use a circuit breaker when a shared dependency has high failure cost, such as accumulating timeout latency across many callers. The breaker rejects calls immediately once failures cross a threshold, then probes recovery in a half-open state instead of hammering a down service.