Event-Driven Architecture
When to Use
- Design event-driven integration between bounded contexts or microservices
- Choose pub/sub vs point-to-point, topics vs queues, and broker capabilities
- Model domain events, integration events, and command vs event semantics
- Apply event sourcing or CQRS at architecture level (not framework tutorials only)
- Define schemas, compatibility rules, and event schema versioning strategy
- Specify ordering, partition keys, and delivery guarantees (at-least-once, etc.)
- Design idempotent consumers, deduplication, and exactly-once tradeoffs
- Implement transactional outbox or inbox for reliable publish/consume
- Decide choreography vs orchestration and saga compensation at pattern level
- Operate dead-letter queues, replay, and stream reprocessing safely
- Distinguish stream processing (Kafka Streams, Flink) from discrete business events
When NOT to Use
- Implement microservice code, gRPC/REST APIs, or twelve-factor deployables only →
microservices-developer
- Design enterprise iPaaS hubs, canonical models, B2B partner APIs, or API gateway programs only →
enterprise-integration-api-developer
- Map X12/EDIFACT segments, AS2/VAN, or EDI partner certification →
edi-engineer
- Build generic application features without event/messaging architecture →
senior-software-engineer
- Operate classified air-gapped pipelines, ATO evidence, cleared promotion →
classified-software-devsecops-engineer
- Formulate VRP, MIP, scheduling, or optimization solvers →
operations-research-algorithm-developer
- CI/CD YAML, GitOps, and release automation only →
devops
- Landing zone, VPC, and managed cloud provisioning →
cloud-engineer
Related skills
| Need |
Skill |
| Service boundaries, gRPC/REST, circuit breakers, contract tests |
microservices-developer |
| Enterprise integration hub, OpenAPI/AsyncAPI, iPaaS, B2B gateways |
enterprise-integration-api-developer |
| EDI standards and partner file exchange |
edi-engineer |
| Application code and refactoring without EDA focus |
senior-software-engineer |
| Classified DevSecOps and artifact promotion |
classified-software-devsecops-engineer |
| OR models, routing, allocation solvers |
operations-research-algorithm-developer |
| Kafka/Rabbit operational platform (brokers, K8s) |
platform-engineer, devops |
| Cross-system ADRs and NFR sign-off |
senior-system-architecture |
| Pipeline security and supply chain |
devsecops |
Core Workflows
1. Scope and event boundaries
Define event types, producers/consumers, sync vs async boundaries, and non-goals.
See references/event_driven_architecture_scope.md.
2. Messaging and brokers
Select patterns, topics/queues, partitioning, and broker fit (Kafka, Pulsar, SNS/SQS, etc.).
See references/messaging_patterns_and_brokers.md.
3. Event sourcing and CQRS
When to use write models, projections, snapshots, and read-model consistency.
See references/event_sourcing_and_cqrs.md.
4. Reliability, idempotency, outbox
Delivery semantics, deduplication, outbox/inbox, and failure handling.
See references/reliability_idempotency_outbox.md.
5. Orchestration, choreography, sagas
Coordinate long-running flows without turning the bus into a distributed monolith.
See references/orchestration_choreography_sagas.md.
6. Schema governance and operations
Version events, operate DLQs, replay, and observability for event pipelines.
See references/schema_governance_operations.md.
Outputs
- Event catalog — event name, schema version, producer, consumers, SLAs, PII classification
- Context diagram — services, topics/queues, sync fallbacks, trust zones
- Consistency note — outbox/saga/choreography choice with compensation and idempotency keys
- Partitioning and ordering spec — keys, guarantees, hot-partition risks
- Schema compatibility matrix — backward/forward rules, deprecation timeline
- Operations runbook — DLQ drain, replay procedure, lag alerts, poison-message handling
Principles
- Prefer explicit contracts (schemas, AsyncAPI/CloudEvents metadata) over implicit JSON blobs
- Design consumers idempotent by default; treat exactly-once as a bounded, measured goal
- Keep commands and events distinct—events are facts; commands request work
- Avoid chatty orchestration over the bus; sagas compensate, they do not hide missing boundaries
- Make failure observable—correlation ID, structured errors, DLQ with actionable payloads
- Replay is a product feature—document ordering, side effects, and deduplication before reprocessing
1---2name: event-driven-architecture3description: Guides event-driven systems—pub/sub, point-to-point, event sourcing, CQRS, schema versioning (Avro/JSON Schema), ordering, partitioning, delivery guarantees, idempotency, exactly-once tradeoffs, transactional outbox/inbox, choreography vs orchestration, sagas, dead-letter queues, replay, stream vs discrete events, microservice boundaries. Use when the user asks for event-driven architecture, event sourcing, CQRS, pub/sub, Kafka events, outbox pattern, idempotent consumer, event choreography, saga orchestration, dead letter queue, or event schema versioning—not microservice code only (microservices-developer), enterprise API/iPaaS only (enterprise-integration-api-developer), EDI (edi-engineer), classified promotion (classified-software-devsecops-engineer), solvers (operations-research-algorithm-developer), generic CRUD (senior-software-engineer).4---56# Event-Driven Architecture78## When to Use910- Design **event-driven** integration between bounded contexts or microservices11- Choose **pub/sub vs point-to-point**, topics vs queues, and broker capabilities12- Model **domain events**, integration events, and command vs event semantics13- Apply **event sourcing** or **CQRS** at architecture level (not framework tutorials only)14- Define **schemas**, compatibility rules, and **event schema versioning** strategy15- Specify **ordering**, **partition keys**, and **delivery guarantees** (at-least-once, etc.)16- Design **idempotent consumers**, deduplication, and **exactly-once** tradeoffs17- Implement **transactional outbox** or **inbox** for reliable publish/consume18- Decide **choreography vs orchestration** and **saga** compensation at pattern level19- Operate **dead-letter queues**, replay, and stream reprocessing safely20- Distinguish **stream processing** (Kafka Streams, Flink) from **discrete business events**2122## When NOT to Use2324- Implement microservice code, gRPC/REST APIs, or twelve-factor deployables only → `microservices-developer`25- Design enterprise iPaaS hubs, canonical models, B2B partner APIs, or API gateway programs only → `enterprise-integration-api-developer`26- Map X12/EDIFACT segments, AS2/VAN, or EDI partner certification → `edi-engineer`27- Build generic application features without event/messaging architecture → `senior-software-engineer`28- Operate classified air-gapped pipelines, ATO evidence, cleared promotion → `classified-software-devsecops-engineer`29- Formulate VRP, MIP, scheduling, or optimization solvers → `operations-research-algorithm-developer`30- CI/CD YAML, GitOps, and release automation only → `devops`31- Landing zone, VPC, and managed cloud provisioning → `cloud-engineer`3233## Related skills3435| Need | Skill |36|---|---|37| Service boundaries, gRPC/REST, circuit breakers, contract tests | `microservices-developer` |38| Enterprise integration hub, OpenAPI/AsyncAPI, iPaaS, B2B gateways | `enterprise-integration-api-developer` |39| EDI standards and partner file exchange | `edi-engineer` |40| Application code and refactoring without EDA focus | `senior-software-engineer` |41| Classified DevSecOps and artifact promotion | `classified-software-devsecops-engineer` |42| OR models, routing, allocation solvers | `operations-research-algorithm-developer` |43| Kafka/Rabbit operational platform (brokers, K8s) | `platform-engineer`, `devops` |44| Cross-system ADRs and NFR sign-off | `senior-system-architecture` |45| Pipeline security and supply chain | `devsecops` |4647## Core Workflows4849### 1. Scope and event boundaries5051Define event types, producers/consumers, sync vs async boundaries, and non-goals.5253**See `references/event_driven_architecture_scope.md`.**5455### 2. Messaging and brokers5657Select patterns, topics/queues, partitioning, and broker fit (Kafka, Pulsar, SNS/SQS, etc.).5859**See `references/messaging_patterns_and_brokers.md`.**6061### 3. Event sourcing and CQRS6263When to use write models, projections, snapshots, and read-model consistency.6465**See `references/event_sourcing_and_cqrs.md`.**6667### 4. Reliability, idempotency, outbox6869Delivery semantics, deduplication, outbox/inbox, and failure handling.7071**See `references/reliability_idempotency_outbox.md`.**7273### 5. Orchestration, choreography, sagas7475Coordinate long-running flows without turning the bus into a distributed monolith.7677**See `references/orchestration_choreography_sagas.md`.**7879### 6. Schema governance and operations8081Version events, operate DLQs, replay, and observability for event pipelines.8283**See `references/schema_governance_operations.md`.**8485## Outputs8687- **Event catalog** — event name, schema version, producer, consumers, SLAs, PII classification88- **Context diagram** — services, topics/queues, sync fallbacks, trust zones89- **Consistency note** — outbox/saga/choreography choice with compensation and idempotency keys90- **Partitioning and ordering spec** — keys, guarantees, hot-partition risks91- **Schema compatibility matrix** — backward/forward rules, deprecation timeline92- **Operations runbook** — DLQ drain, replay procedure, lag alerts, poison-message handling9394## Principles9596- Prefer **explicit contracts** (schemas, AsyncAPI/CloudEvents metadata) over implicit JSON blobs97- Design consumers **idempotent by default**; treat exactly-once as a bounded, measured goal98- Keep **commands and events** distinct—events are facts; commands request work99- Avoid **chatty orchestration** over the bus; sagas compensate, they do not hide missing boundaries100- Make **failure observable**—correlation ID, structured errors, DLQ with actionable payloads101- **Replay is a product feature**—document ordering, side effects, and deduplication before reprocessing