event-driven-patterns

Document event-driven architecture patterns for asynchronous, eventually consistent microservices.

1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/kssumin/claude-playground --skill event-driven-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: event-driven-patterns
Source: https://github.com/kssumin/claude-playground/tree/main/.claude/skills/event-driven-patterns
Command: npx skills add https://github.com/kssumin/claude-playground --skill event-driven-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a reference guide for event-driven architecture patterns to help engineers design asynchronous, eventually consistent systems with reliable messaging and observable behavior.

Core Features & Use Cases

  • Event design patterns: defines domain events and payload structures for robust messaging across microservices.
  • Reliability & consistency: outlines strategies such as Outbox patterns, idempotent consumers, and state machines to achieve eventual consistency.
  • Operational guidance: DLQ handling, monitoring, and event schema evolution considerations with practical examples.
  • Observed flow reference: sample flow from API to delivery through Kafka and external systems.

Quick Start

Model a minimal event-driven workflow from API to delivery using a single topic and a simple consumer to verify idempotency and DLQ behavior.

Frequently Asked Questions about event-driven-patterns

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

FAQPage Schema
How do I design an idempotent consumer for Kafka topics in microservices?

The event-driven outbox pattern solves this by writing events to an outbox table within the same database transaction as your domain state changes. A separate process then reliably publishes those events to Kafka, ensuring atomic state transitions and reliable messaging.

What is the best way to handle dead-letter queues in an event-driven architecture?

The best way to handle a dead-letter queue is to define DLQ policies for poison pills and establish compensating transactions for failed state transitions. This operational guidance ensures observable behavior and prevents message processing bottlenecks.

How does the outbox pattern work for reliable event-driven messaging?

The outbox pattern works by storing domain events in a dedicated database table alongside state transitions before asynchronously publishing them to Kafka. This guarantees reliable event delivery without dual-write consistency issues in event-driven systems.

Can I use event-driven patterns for eventual consistency across microservices?

Yes, you can use event-driven patterns to achieve eventual consistency across microservices by leveraging asynchronous messaging, idempotent consumers, and versioned event schemas. These strategies coordinate state transitions and ensure reliable system integration.

When do I need compensating transactions in asynchronous event-driven systems?

You need compensating transactions in event-driven systems when a downstream service fails to process a domain event, requiring a rollback of previous state transitions. They maintain eventual consistency by reversing completed operations within asynchronous messaging flows.