Skip to main content

Event-Driven Architecture

1. Executive Summary​

Event-driven architecture (EDA) is a software design style in which components communicate by producing and consuming events—immutable records of something that happened—rather than invoking each other synchronously. EDA enables loose coupling, independent scaling, temporal decoupling, and multiple reactions to the same fact. It introduces challenges: eventual consistency, distributed debugging, schema evolution, ordering across aggregates, and duplicate event processing.

EDA spans patterns from simple event notification (fire-and-forget facts) to event-carried state transfer, CQRS (separate read/write models), and event sourcing (state derived from event log). Principal architects must distinguish choreography (decentralized reactions) from orchestration (central workflow control) and align transport semantics (at-least-once) with idempotent consumers.

This chapter covers EDA patterns, integration styles, consistency boundaries, schema governance, observability, failure modes, organizational implications, and principal-level design reviews.

2. Why This Topic Matters​

Modern enterprises adopt EDA for microservices, real-time analytics, and integration hubs. Interviews ask: "Design a notification system when an order ships" or "How do services stay consistent without tight coupling?"

Strong candidates explain:

  • Events are facts, not commands—naming and semantics matter (OrderShipped vs ShipOrder).
  • Choreography scales teams but obscures global flow; orchestration aids visibility.
  • Read models lag behind write models in CQRS—UX and SLAs must account for delay.
  • Event sourcing is not free—snapshotting, replay cost, and schema migration complexity.

Production failures include circular event dependencies, schema breaking changes taking down consumers, phantom events from at-least-once duplicates, and inability to trace a business transaction across 15 topics. Architects who adopt EDA without contracts and observability trade one monolith problem for a distributed graph problem.

3. Problems Being Solved​

ProblemSynchronous integrationEvent-driven approach
Tight couplingCaller knows callee APIPublisher unaware of subscribers
Availability cascadesDownstream failure blocks callerAsync buffer; consumer catches up
Multiple reactionsOrchestrator fans out callsMultiple consumers same topic
Audit / analyticsSeparate ETL batchStream from same event log
Peak loadCaller blockedQueue absorbs spikes

EDA solves decoupled integration and multi-subscriber fan-out. It does not solve immediate consistency, simple request-response latency, or automatic cross-service transactions without sagas/outbox patterns.

4. Assumptions and System Model​

Assume microservices with private data stores and a message broker (often Kafka):

  • Events are immutable once published (corrections via compensating events).
  • Delivery is at-least-once unless infrastructure provides stronger guarantees.
  • Consumers maintain idempotent handlers and versioned schema tolerance.
  • Clocks are not synchronized—use event timestamps and versioning, not wall-clock ordering globally.
  • Failures: Broker outage, consumer lag, poison messages, schema mismatch.

Event types:

TypePurposeExample
Event notificationSignal occurred; consumer fetches detailOrderPlaced with ID only
Event-carried state transferPayload includes needed dataOrderPlaced with line items
Domain eventBusiness-meaningful factPaymentCaptured
Integration eventCross-bounded-contextCRM.CustomerUpdated

5. Essential Terminology​

TermDefinition
EventImmutable record of past occurrence.
CommandRequest to perform action; one intended handler.
ChoreographyDecentralized: services react without central controller.
OrchestrationCentral coordinator directs steps (may use events).
CQRSCommand Query Responsibility Segregation—split write/read paths.
Event sourcingPersist state changes as event sequence; rebuild state by replay.
ProjectionRead model built from event stream.
Outbox patternAtomic DB write + event staging for reliable publish.
Schema registryCentral contract for event payload versions.
Eventual consistencyReplicas converge without simultaneous strong consistency.

Mnemonic: Events are past tense; commands are imperative.

6. Core Mechanism​

Choreographed order flow​

Figure 1: Choreography—each service subscribes and publishes; no central workflow store.

CQRS with event projection​

Figure 2: Write path appends events; projections build specialized read models asynchronously.

Outbox for reliable publishing​

Figure 3: Outbox ties local commit to eventual publish—avoids dual-write inconsistency.

7. Step-by-Step Walkthrough​

Scenario: Migrate monolith checkout to event-driven microservices.

PhaseActionOutcome
1Identify bounded contextsOrder, Payment, Inventory, Shipping
2Define domain eventsOrderPlaced, PaymentFailed, StockReserved
3Choose notification vs state transferLine items in event vs lookup API
4Implement outbox per serviceReliable publish after local commit
5Schema registry with AvroVersioned contracts
6Idempotent consumersevent_id dedup table
7Observabilitytrace_id propagation in event headers
8Saga for failureOrchestrator or choreographed compensation

Event notification variant:

StepFlow
1OrderPlaced { order_id } published
2Payment service calls Order API for details
3Coupling reintroduced via API—acceptable if API stable

Event-carried state transfer variant:

StepFlow
1OrderPlaced { order_id, items, total } published
2Payment processes without Order API call
3Risk: Large payloads; stale if order changes—version events

CQRS read lag example:

TimeWrite modelRead model (projection)
T0Order created—
T1Event in logProjector processing
T2—Order visible in list API

Customer may refresh before T2—design UX (spinner, optimistic UI) or read-your-writes routing.

Event naming and schema conventions (production governance):

RuleGood exampleBad example
Past tense, domain prefixorders.OrderPlacedcreateOrder
Version in schema, not topicAvro OrderPlacedV3orders-v3-topic
Include correlation IDstrace_id, causation_idBare payload
Immutable fields documentedorder_id never changesUndocumented renames
Avoid event-as-RPCPaymentCaptured (fact)ChargePayment (command on bus)

Command Query Responsibility Segregation (CQRS) depth:

CQRS splits the write model (optimized for commands, validation, invariants) from read model (optimized for queries, denormalized views). In event-driven CQRS:

ComponentResponsibility
Command handlerValidate; append domain event to event store or outbox
Event busDistribute events to projectors
ProjectorTransform events into read-optimized tables or search indexes
Query APIServe reads only from projections—never from write DB directly

When CQRS is justified: Multiple read patterns with different access paths (list view, detail view, search, analytics); high read:write ratio; need independent scaling of read side. When to avoid: Simple CRUD with one read pattern; team lacks operational maturity for projection lag monitoring.

Event sourcing vs event-driven (critical distinction):

AspectEvent-driven (notification)Event sourcing
Source of truthDatabaseEvent log
State recoveryRead current rowReplay all events
Schema changesMigrate tablesUpcast events
ComplexityMediumHigh
Audit trailOptionalBuilt-in

Event sourcing stores all state changes as events and derives current state by replay—a specialized form of EDA. Most organizations need event-driven integration without full event sourcing.

Organizational implications of choreography:

Team sizeChoreography riskMitigation
2–4 servicesLowShared runbook
5–10 servicesMediumEvent catalog, tracing
10+ servicesHighOrchestration for critical paths; integration guild

Without governance, choreography becomes implicit coupling—teams subscribe to events they do not own and break when producers change schemas silently.

Integration patterns catalog (Hohpe & Woolf mapped to EDA):

EIP patternEDA manifestation
Publish-Subscribe ChannelKafka topic with multiple consumer groups
Message RouterContent-based routing via headers or topics
Message FilterConsumer-side filter on event type
AggregatorStream processor building composite events
Process ManagerSaga orchestrator (not pure choreography)
Dead Letter ChannelDLQ topic for poison events

Strangler fig migration to EDA:

Incremental migration from monolith without big-bang rewrite:

PhaseAction
1Extract read APIs; add CDC from monolith DB
2Publish domain events from CDC without changing monolith code
3New microservice consumes events; builds read model
4Route read traffic to new service (strangler)
5Extract write path; monolith becomes thin or retired

CDC-based event emission avoids dual-write during early phases—events reflect actual monolith commits.

Testing event-driven systems:

Test typeValidates
Contract testSchema compatibility producer ↔ consumer
Integration testEnd-to-end event flow with test broker
Chaos testDelayed events, duplicate delivery, broker outage
Property-basedCompensation order in sagas
Replay testProjector rebuild from offset 0 matches production snapshot

Event-driven architectures require test infrastructure investment—teams without contract tests in CI experience production schema breakage monthly.

Anti-patterns to flag in architecture reviews:

Anti-patternSymptomRemediation
Distributed monolithSync chains across 6 servicesConsolidate or async boundary
Event notification hell50-line stack traces for one clickOrchestration or tracing
Shared database + eventsDual source of truthPick one write path
Generic Event typeUntyped JSON blobsSchema registry
Missing idempotencyDuplicate side effects on retryDedup keys mandatory

Latency vs resilience tradeoff (quantitative framing):

Sync call chain of 5 services at 50ms p99 each ≈ 250ms best-case serial latency. Event-driven path: 5ms publish + 50ms consumer lag + 50ms processing ≈ 105ms minimum but unbounded upper tail if consumer lags. Choose sync when user waits for result; choose async when operation can complete in background with notification.

8. Invariants and Guarantees​

PropertyTypeStatement
Event immutabilitySafety (design)Corrections via new events, not edits
Publisher unaware of subscribersDecouplingNew consumers don't require publisher change
Cross-service immediate consistencyNot providedEventual unless sync read
OrderingPer-partition/key typicallyGlobal order not guaranteed
Exactly-once effectApplicationIdempotency required

9. Failure Scenarios​

Scenario 1: Cyclic event dependency​

Setup: Service A emits event triggering B, which triggers A again.

Effect: Infinite loop or stack overflow in choreography.

Mitigation: Event ownership rules; state machines; idempotency; cycle detection in design reviews.

Scenario 2: Breaking schema change​

Setup: Producer adds required field; old consumers fail deserialize.

Effect: Consumer stall; lag explosion.

Mitigation: BACKWARD/FULL compatibility modes; dual-schema period; consumer-first deploy.

Scenario 3: Missing event​

Setup: Outbox relay down; order in DB but no OrderPlaced.

Effect: Payment never starts—stuck order.

Mitigation: Outbox monitoring; reconciliation job comparing DB to topic.

Scenario 4: Duplicate events​

Setup: At-least-once redelivery.

Effect: Double shipment, double email.

Mitigation: Idempotency keys; dedup store.

Scenario 5: Slow projection​

Setup: Analytics projection falls hours behind.

Effect: Stale dashboards—not always critical; SLA breach if used for fraud.

Mitigation: Separate consumer groups; scale projectors; prioritize critical projections.

Scenario 6: God topic anti-pattern​

Setup: One mega-topic with 200 event types, no schema discipline.

Effect: Unmanageable consumers; coupling via shared topic.

Mitigation: Topic per bounded context; registry governance.

10. Performance Characteristics​

FactorImpact
Async bufferAbsorbs spikes; adds end-to-end latency
Fan-outN consumers × bandwidth per event
Projection rebuildReplay time proportional to log size
Sync enrichment callsDefeats decoupling benefits
Small chatty eventsOverhead—batch or state transfer judiciously

Latency budget: Event-driven paths often add tens to hundreds of ms vs sync RPC—acceptable for many domains, not for HFT-style systems.

11. Scalability Limits​

  • Consumer lag under sustained overload—unbounded retention costs.
  • Projection complexity—each new read model is ongoing compute debt.
  • Organizational scaling—choreography beyond ~10 services needs strong governance.
  • Event store size—event sourcing growth requires compaction and archival strategy.

12. Operational Considerations​

  • Event catalog documenting producers, consumers, schemas, SLAs.
  • Distributed tracing across publish/consume boundaries.
  • Dead-letter queues per consumer with replay runbooks.
  • Contract testing (Pact, schema compatibility CI).
  • On-call playbooks for lag, DLQ depth, schema failures.
  • Reconciliation jobs for money and inventory paths.

13. Security Considerations​

  • Event payloads may contain PII—encrypt sensitive fields.
  • Topic ACLs restrict produce/consume principals.
  • Tampering—sign events in high-trust domains.
  • Authorization at consumer—don't trust event content without verifying source.

14. Cost Considerations​

  • Broker storage for retention and replay.
  • Multiple projections multiply compute and storage.
  • Engineering complexity vs monolith—higher initial cost.
  • Saved cost when decoupling prevents cascade outages and enables independent deploy velocity.

15. Production Implementations​

Netflix​

Event-driven microservices at scale—anecdotal emphasis on resilient async pipelines and chaos testing.

Uber / Grab​

Domain events for trip lifecycle—choreography with rigorous schema governance.

Zalando​

Event-driven architecture guidelines—open internal patterns for event naming and versioning.

Banking event hubs​

Kafka as integration backbone with schema registry and outbox from core banking—regulatory audit via immutable events.

Shopify (flash sales)​

Async order processing absorbs traffic spikes—implementation choice combining queues and events.

16. Alternatives and Tradeoffs​

StyleCouplingConsistencyComplexity
Sync REST/gRPCHighImmediateLower
Event notification EDALowEventualMedium
Event sourcing + CQRSLow write couplingEventual readsHigh
Batch ETLVery looseHours delayMedium
Orchestrated sagaMediumControlled stepsMedium-high

17. Common Misconceptions​

MisconceptionReality
"EDA eliminates coupling"Semantic and schema coupling remain.
"Events replace APIs"Query APIs still needed for lookups.
"Event sourcing for everything"High complexity—use where audit/replay justify cost.
"Choreography always scales better"Debugging cost grows; orchestration helps critical paths.
"Async = faster"Often higher latency; better throughput and resilience.

18. Principal Architect Perspective​

  1. Start with integration events, not full event sourcing, unless requirements demand replay.
  2. Mandate outbox for any DB + publish combination.
  3. Name events in past tense with versioned schemas.
  4. Choose orchestration for revenue-critical multi-step flows; choreography for orthogonal reactions.
  5. Invest in observability before service count exceeds tracing comprehension.

Organizational design: Assign event owners per bounded context; consumers propose schema changes via RFC—not ad hoc producer edits.

19. Architecture Review Exercise​

Scenario: 8 teams publish to company-events topic; 40 consumer groups; no registry; events named update, change, notify.

Review prompts:

  1. Schema breakage risk?
  2. Can you trace one customer order?
  3. Who approves new event types?
  4. Refactoring plan?

Expected findings: Split topics by domain; Schema Registry; naming convention; event catalog; trace propagation; retire god topic gradually.

20. Whiteboard Explanation​

90-second version:

"Event-driven architecture means services publish facts when something happens, and other services react asynchronously. It decouples producers from consumers—you can add a new subscriber without changing the publisher. Tradeoff is eventual consistency and harder debugging. Use past-tense domain events like PaymentCaptured, not commands. Pair database writes with an outbox so you don't publish without committing or commit without publishing. Consumers must be idempotent because delivery is at-least-once. CQRS separates write and read models updated by projections—reads lag writes. Choreography is decentralized reactions; orchestration uses a coordinator for multi-step flows like sagas. Schema registry and contract tests prevent breaking consumers. Not every interaction should be an event—sync APIs still fit query and low-latency paths."

21. Interview Questions​

  1. Event vs command?

    • Signals: Past fact vs imperative request; multiple vs single handler.
  2. Choreography vs orchestration?

    • Signals: Decentralized events vs central coordinator.
  3. Why outbox pattern?

    • Signals: Atomic local state + reliable publish.
  4. CQRS tradeoffs?

    • Signals: Scaled reads; eventual read lag; complexity.
  5. Event sourcing when?

    • Signals: Audit, replay, temporal queries—not default CRUD.
  6. Handle schema evolution?

    • Signals: Registry, compatibility, optional fields, version.
  7. Debug stuck workflow in choreography?

    • Signals: Tracing, saga state, timeouts, event catalog.
  8. Notification vs state transfer?

    • Signals: Coupling vs payload size tradeoff.
  9. Design order-shipped notifications.

    • Signals: Domain event, fan-out, idempotency, DLQ.
  10. When avoid EDA?

    • Signals: Strong sync consistency, simple CRUD, low team maturity.

Scoring rubric:

DimensionStrongWeak
ConsistencyEventual + mitigation"Always consistent"
PatternsOutbox, CQRS scopeBuzzwords only
OpsTracing, schema, DLQNo governance

22. Interview Follow-Ups​

  1. Read model 30s stale—acceptable?

    • Signals: Domain dependent; fraud vs catalog browse.
  2. Migrate monolith to EDA incrementally?

    • Signals: Strangler; outbox; dual write avoidance.
  3. Event sourcing snapshot strategy?

    • Signals: Periodic snapshots + replay from offset.

22A. Production Low-Level Design (Interview + Game Day)​

Outbox + idempotent consumers—choreography for reactions, saga for critical path. Production LLD and Game Day Standard.

Event contract​

FieldPurpose
event_id (UUID)Consumer dedupe / inbox
aggregate_idPartition key
schema_versionEvolution
occurred_atOrdering hint (not global)

Step-by-step flow:

StepFailureMitigation
1Crash before commitNo event (good)
2Publish OK, mark failDuplicate → inbox
4–5RedeliveryIdempotent handler

SLO​

Outbox→Kafka lag p99 < 5s; consumer duplicate processing = safe (inbox hit rate logged).


22B. Game Day Playbooks​

#DrillInjectDetectMitigateVerify
GD-1Duplicate stormReplay topic offsetInbox dedupe ↑Idempotent handlersNo double reserve
GD-2Schema breakDeploy v2 without compatDeser errorsDLQ + rollbackv1 consumers OK
GD-3Relay stallStop outbox pollerLag alarmScale relayPending drained

GD-1 — Duplicate event delivery​

23. Strong Answer Example​

Question: "Design event-driven order fulfillment."

Answer this as a 45-minute greenfield design using the PRACTICE framework. Below is how a strong student sounds aloud—facts via outbox, critical path as a saga, orthogonal reactions as choreography, and a sync read path for status.

PRACTICE interview answer map for event-driven order fulfillment

Figure A: PRACTICE map — Problem → Requirements → Assumptions → Capacity → Topology → Invariants → Constraints → Evolution.


Student interview script (PRACTICE)​

P — Problem framing​

"We're designing event-driven order fulfillment: customer places an order; we charge payment, reserve inventory, ship, and notify—without chaining every service in a sync call stack.

Events are past-tense facts (OrderPlaced, PaymentCaptured), not commands on a bus. I'll keep sync APIs for place-order and status query.

Non-goals for v1: full event sourcing of every aggregate, and replacing the customer status API with 'just read Kafka.'"

R — Requirements​

TypeRequirement
FRPlace order; payment; inventory reserve; ship; notify; cancel/compensate on failure
NFRAt-least-once publish/consume with idempotent handlers; p99 place-order API latency; eventual status consistency seconds not hours
ConsistencyNo dual-write (DB commit without event); compensation order defined for saga
OpsSchema registry; DLQ; trace across topics; nightly reconciliation

"I'll ask: orchestrated saga or pure choreography? Inventory before payment? I'll assume payment then inventory then ship, with orchestration for that path and choreography for email/analytics."

A — Assumptions (state aloud)​

AssumptionWhy it matters
Kafka (or equivalent) logFan-out, replay, partition key = order_id
At-least-once deliveryConsumers must be idempotent
Outbox or CDC from order DBAvoids dual-write inconsistency
Schema RegistryBACKWARD-compatible evolution
Not full event sourcingIntegration events + local state is enough for v1

"If they push pure choreography for payment→inventory→ship, I'd warn: compensation order and stuck states get hard to debug—I'd still orchestrate the revenue path."

C — Capacity (back-of-envelope)​

Peak place-order QPS → 2,000 (say)
Events per successful order → ~5–8 (Placed, Paid, Reserved, Shipped, Notified, …)
Peak event publish → ~10–15K/sec including failures/retries
Partition key → order_id (per-order ordering)
Consumer groups → payment, inventory, shipping, notify, analytics (separate)
Outbox lag SLO → p99 publish < 1–2s after commit
Read-model lag → status projection < few seconds

"I'd size partitions for consumer parallelism, not just broker disk—and keep analytics on its own consumer group so it can't starve fulfillment."

T — Topology (draw this)​

Event-driven order fulfillment topology

Figure B: Sync place-order/status API; Order service DB+outbox → Kafka; orchestrated payment→inventory→ship; choreographed notify/analytics; schema registry + read model.

Pattern split (say aloud):

PathStyleWhy
Payment → inventory → shipOrchestrated sagaCompensation order matters; need visibility
Email, analytics, CRMChoreographyOrthogonal; add subscribers without changing order service
Customer statusCQRS read modelSync query; projection from events—not N sync hops

Order fulfillment saga and outbox flow

Figure C: Outbox OrderPlaced → payment → stock → ship; failure paths compensate; idempotent event_id; DLQ.

Happy path + failure (whiteboard):

  1. Client PlaceOrder → Order service validates → one TX: order row + outbox OrderPlacedV2.
  2. Relay/CDC publishes to orders.events (key=order_id).
  3. Saga/orchestrator (or payment consumer) charges → PaymentCaptured / PaymentFailed.
  4. On success → reserve stock → StockReserved / compensate + fail order.
  5. Ship → OrderShipped → notify + analytics fan-out.
  6. On mid-flight failure → compensating events (StockReleased, PaymentRefunded) in defined order.
  7. Status projector updates read model for GET /orders/{id}.

I — Invariants (safety)​

"Non-negotiable:

  1. Outbox with local commit—never publish without DB commit or commit without eventual publish.
  2. Idempotent consumers on event_id (or natural key)—at-least-once will duplicate.
  3. Past-tense domain events—facts, not ChargePayment as a bus RPC.
  4. Per-order_id ordering on the fulfillment topic; no global order assumption.
  5. Saga compensations are explicit—don't leave reserved stock after payment failure."

C — Constraints (second C)​

ConstraintDesign response
Eventual consistencyUX: "processing"; poll status / push notification
Schema breaksRegistry + BACKWARD; contract tests in CI
Poison messagesRetry with backoff → DLQ + alert after N
Dual-write temptationOutbox/CDC only
God topicDomain topics / event types owned by bounded context
Debuggingtrace_id / correlation_id in headers; event catalog

E — Evolution (phased rollout)​

Phased delivery:

PhaseDeliverable
M1Order service + outbox + OrderPlaced; one consumer (payment)
M2Inventory + shipping; saga compensations; idempotent stores
M3Notify/analytics choreography; schema registry
M4Status read model + sync query API; DLQ runbooks
M5Nightly reconciliation (orders DB vs event completeness); chaos: duplicate/delay

Failure modes I'd mention:

FailureMitigation
Outbox relay downLag alert; orders exist, events catch up—don't dual-write manually
Duplicate OrderPlacedIdempotent payment on order_id / event_id
Payment succeeds, inventory failsCompensate refund or retry reserve per policy
Missing OrderShippedTimeout/watchdog in saga; reconciliation
Cyclic eventsBan A↔B trigger loops; orchestration for critical path

Observability: outbox lag, consumer lag per group, DLQ depth, saga state age, place-order SLO, reconciliation diffs.


Closing line (interview)​

"So: Order service commits DB + outbox atomically, publishes OrderPlaced to Kafka keyed by order_id. Orchestrated saga for payment→inventory→ship with compensations; choreography for email/analytics. Idempotent consumers, schema registry, DLQ, trace headers. Customer status via read-model projection—sync API stays. Not every hop is an event, and not every reaction is choreography."

Scoring signals​

StrongWeak / red flag
Outbox / CDC for reliable publish"Just publish after insert"
Saga vs choreography splitKafka for everything, no failure story
Idempotent consumersIgnore at-least-once duplicates
Sync status read model"Clients read topics"
Schema registry + DLQNo contracts / poison handling
Compensating actionsHappy path only

Compact outline (if time-boxed to 2 minutes)​

"Place order sync: DB + outbox OrderPlaced. Kafka key=order_id. Orchestrated saga: pay → reserve → ship with compensations. Choreography for notify/analytics. Idempotent event_id. Schema registry BACKWARD. Status = projected read model. DLQ + traces + nightly reconcile."

24. Weak Answer Example​

Question: "Design event-driven order fulfillment."

"Use Kafka events between services whenever something happens."

Why weak / red flags: No outbox, schema, idempotency, saga/compensation, failure flow, or sync read path—buzzword EDA without reliability.

25. Hands-On Exercise​

  1. Model 4 services with in-memory event bus.
  2. Implement outbox table + relay loop.
  3. Break schema—observe consumer failure.
  4. Add Avro/JSON schema version field.
  5. Inject duplicate events—test idempotency.
  6. Add OpenTelemetry trace across publish/consume.
  7. Draw event catalog for your domain.

26. Knowledge Check​

  1. Events name tense? (Past tense.)
  2. Outbox solves? (Dual-write problem.)
  3. CQRS separates? (Commands/writes vs queries/reads.)
  4. Choreography weakness? (Hard global visibility.)
  5. Delivery default? (At-least-once.)

27. Flashcards​

#FrontBack
1Domain eventBusiness fact that occurred.
2ChoreographyDecentralized event reactions.
3OrchestrationCentral workflow control.
4CQRSSplit write and read models.
5Event sourcingState from event replay.
6ProjectionRead model from stream.
7OutboxTX-safe event publish.
8Schema registryVersioned contracts.
9Event notificationThin event + lookup.
10State transferFat event payload.

28. Cheat Sheet​

EVENT RULES
Past tense names
Immutable — correct with new event
Version schemas

PATTERNS
Notification: thin event
State transfer: fat event
Outbox: DB + publish consistency
CQRS: write log → projections

GOVERNANCE
Event catalog
Owner per bounded context
Compatibility CI

FAILURE
Idempotent consumers
DLQ + replay
Reconciliation

30. References​

Primary sources​

  • Hohpe, G., & Woolf, B. (2003). Enterprise Integration Patterns — event message patterns.
  • Fowler, M. "Event-Driven Architecture" — event notification vs sourcing vs CQRS.

Engineering​

Distinction​

Claim typeSource
EDA pattern definitionsHohpe & Woolf; Fowler
Outbox patternEngineering practice; DDIA
Production scale anecdotesCompany engineering blogs—verify independently