| license | Apache-2.0 |
| name | event-driven-architecture-expert |
| description | Message queues, pub/sub, event sourcing with Kafka, RabbitMQ, Redis Streams. Activate on: event-driven, message queue, pub/sub, Kafka, RabbitMQ, event bus, async messaging, dead letter queue. NOT for: CQRS projections (use cqrs-event-sourcing-architect), real-time WebSocket (use websocket-realtime-expert), observability (use observability-apm-expert). |
| allowed-tools | Read,Write,Edit,Bash(npm:*,npx:*,docker:*) |
| category | Backend & Infrastructure |
| tags | ["event-driven","kafka","messaging","pub-sub","rabbitmq"] |
| pairs-with | [{"skill":"cqrs-event-sourcing-architect","reason":"Event sourcing builds on event-driven foundations"},{"skill":"streaming-pipeline-architect","reason":"Streaming pipelines consume event-driven sources"},{"skill":"observability-apm-expert","reason":"Distributed tracing across async event flows"}] |
Event-Driven Architecture Expert
Design and implement resilient message-driven systems using Kafka, RabbitMQ, Redis Streams, and cloud-native event buses.
Activation Triggers
Activate on: "event-driven", "message queue", "pub/sub", "Kafka", "RabbitMQ", "event bus", "async messaging", "dead letter queue", "event broker", "fan-out", "Redis Streams"
NOT for: CQRS projections/event stores → cqrs-event-sourcing-architect | WebSocket real-time → websocket-realtime-expert | Distributed tracing → observability-apm-expert
Quick Start
- Identify event boundaries — map domain events to bounded contexts
- Choose broker — Kafka for ordered logs, RabbitMQ for routing flexibility, Redis Streams for lightweight queues
- Define event schemas — use CloudEvents spec with JSON Schema or Avro
- Implement idempotent consumers — design for at-least-once delivery
- Configure DLQ and retry policies — never silently drop messages
Core Capabilities
| Domain | Technologies |
|---|
| Message Brokers | Apache Kafka 3.8+, RabbitMQ 4.x, Redis Streams 7.4 |
| Cloud-Native | AWS EventBridge, GCP Pub/Sub, Azure Service Bus |
| Schema Registry | Confluent Schema Registry, AWS Glue, Apicurio |
| Serialization | CloudEvents 1.0, Avro, Protobuf, JSON Schema |
| Frameworks | KafkaJS, amqplib, BullMQ 5.x, Temporal |
Architecture Patterns
Fan-Out with Dead Letter Queue
Producer → Topic/Exchange
├─→ Consumer A (order-service)
├─→ Consumer B (notification-service)
└─→ Consumer C (analytics-service)
↓ (failure after 3 retries)
Dead Letter Queue → Alert + Manual Review
Transactional Outbox Pattern
Avoid dual-write problems by writing events to an outbox table within the same DB transaction, then polling/CDC to publish:
┌─────────────────────────────┐
│ BEGIN TRANSACTION │
│ INSERT INTO orders (...) │
│ INSERT INTO outbox ( │
│ event_type, payload, │
│ published_at = NULL │
│ ) │
│ COMMIT │
└─────────────────────────────┘
↓ (CDC / Poller)
Kafka / RabbitMQ Topic