Event-Driven Architecture & Message Ordering Hardening
Review Kafka, RabbitMQ, or SQS/SNS event architectures for exactly-once semantics, out-of-order delivery, and DLQs.
Design and harden event-driven messaging pipelines (Kafka, SQS FIFO, RabbitMQ) with idempotent consumer handlers, dead-letter queues, and partition key strategies.
Execution Workflow Procedure
Ordered steps the coding agent executes when performing this skill.
Design Partition Keys & Ordering
Assign high-cardinality partition keys (e.g. tenant_id, order_id) to guarantee in-order message delivery without hot partitions.
Implement Idempotent Consumer Logic
Wrap message processing in database transactions that verify idempotency keys against a processed_events table.
Configure DLQ & Poison Pill Handling
Route non-retryable deserialization failures directly to a Dead-Letter Queue while retrying transient network errors with exponential backoff.
Agent Safety Guardrails & Anti-Hallucination Rules
- DO NOT assume message brokers provide exactly-once processing; always implement idempotent consumers.
- DO NOT block an entire partition queue on unhandled deserialization errors.
Expected Output Format
Event envelope schema, idempotency design, and consumer implementation.
Domain Verification Checks
Example Agent Invocations
Install / Configure This Skill
# Place in .cursorrules or create .cursor/rules/event-driven-architecture-hardening.mdc # Trigger: Whenever you perform event-driven architecture & message ordering hardening --- name: event-driven-architecture-hardening description: Harden event-driven systems with partition key ordering, idempotent consumers, and Dead-Letter Queue routing. version: 1.0.0 compatibility: [Cursor, Claude Code, Cline, Roo Code, Antigravity] --- # Event-Driven Architecture & Message Ordering Hardening ## Objective Build resilient asynchronous event pipelines with partition ordering, idempotent consumers, and automatic dead-letter queue routing. ## Workflow 1. **Partition Strategy**: Use high-cardinality entity keys for consistent partition hashing. 2. **Idempotency Check**: Validate event IDs in a local transaction before executing side effects. 3. **Error Isolation**: Route poison pills to DLQ while retrying transient failures with backoff.
Need a quick one-time prompt for chat?
Try the Event-Driven Architecture & Message Ordering Review — a lightweight version designed for 1-click copying directly into Claude, ChatGPT, or Cursor chat.
SprintKit Workflow Integrations
Complementary tools and checklists to pair with this agent workflow.
Related Agent Skills
Explore related procedural workflows in this discipline.
Monolith Decomposition into DDD Bounded Contexts
Deconstruct monoliths or complex systems into bounded contexts with clear domain events and data ownership.
Backward-Compatible RESTful API Design & OpenAPI Spec
Design or review RESTful API contracts for idempotency, pagination, error models, and non-breaking versioning.
Technical Design Document (RFC / ADR) Generation
Generate thorough, engineering-ready Request for Comments (RFC) and Architecture Decision Records (ADRs).