Catalog My learning Blog
Event-Driven Architecture Course: Event Sourcing and CQRS · Phase 1 · Lesson 4 · 8 min read

Event-Driven Architecture Pros and Cons

On this page
  1. Learning Objective
  2. Concept Explanation
  3. Worked Example: Correlation and Causation Ids That Make a Chain Reconstructable
  4. Real-World Examples
  5. Review Questions & Answers

Learning Objective

Describe precisely what an event-driven system gives up in exchange for decoupling, explain eventual consistency in terms a product owner would accept, and identify the observability investments that are mandatory rather than optional once causality no longer fits in a single stack trace.

Concept Explanation

The previous three lessons made the case for events. This one makes the counter-case honestly, because the most common failure mode in adopting event-driven architecture is not a technical mistake but an accounting one: teams book the benefits and forget to book the costs. There are three costs, and they are all real.

The first is eventual consistency. The moment work moves out of the request path, the system stops having a single answer to the question of what is true right now. The order exists but the inventory has not been decremented; the user has been created but their search index entry is forty milliseconds behind; the payment succeeded but the order still shows as pending. None of this is a bug, and none of it can be engineered away by better code. The convergence window is usually small, but the important number is not the median, it is the tail: what happens when a consumer is down for twenty minutes, or when a backlog builds behind a slow projection. Every user-visible surface has to have an answer for the inconsistent state, and deciding that answer is a product decision as much as an engineering one.

The second is the debugging tax. In a request-driven system, a failing request produces one stack trace with a clear causal chain from entry point to failure. In an event-driven system, an order that mysteriously never shipped could be an event that was never published, an event published to the wrong topic, a consumer that crashed mid-batch, a consumer that silently dropped the message into a dead letter queue, a schema mismatch that caused a deserialization failure, a partition whose consumer has been stuck for an hour, or a correctly-processed event whose effect was overwritten by an out-of-order sibling. Reconstructing that chain requires infrastructure: correlation and causation ids propagated through every event, distributed tracing spans that cross the broker boundary, structured logging that includes event ids, consumer lag dashboards per partition, and dead letter queue alerting that a human actually sees. In a request-driven system that infrastructure is nice to have. Here it is the difference between a debuggable system and an undebuggable one.

The third is coupling that moved rather than disappeared. Services no longer depend on each other's availability, but every consumer depends on the event schema, which means the producer now has an implicit contract with an unknown and growing set of consumers it cannot enumerate. Worse, semantic coupling is invisible: a consumer might depend on the ordering relationship between two event types, or on an event always being followed within a second by another, or on a field that is technically optional but has never actually been null. None of that appears in a schema registry, and all of it breaks silently. And there is the temporal coupling nobody plans for: a system that appears decoupled can still have a hidden dependency where consumer B only works if consumer A has already processed the same event, which is a distributed race condition dressed up as an architecture.

The honest framing is that event-driven architecture does not reduce complexity; it relocates it. The complexity that lived in call graphs and retry logic now lives in schema evolution, consumer lag, idempotency, ordering assumptions, and reconciliation. That relocation is worth it when the organizational and scaling benefits are real, which is exactly the judgment the next lesson is about. It is not worth it when a team adopts the pattern for a system that would have been a single well-factored service.

What you gainWhat it costsWhat the cost demands in practice
Producer independent of consumersProducer cannot know who breaks when the schema changesSchema registry, compatibility rules, versioned events
Availability decoupled via the brokerNo immediate answer for the userProvisional UI states, status endpoints, or asynchronous notification
Cheap fan-out to new consumersCausality spread across many processesCorrelation and causation ids, distributed tracing across the broker
Consumers absorb bursts via the backlogA silently lagging consumer looks healthyPer-partition consumer lag alerting, not just process liveness checks
Failures isolated to one consumerPartial completion states become normalReconciliation jobs and explicit compensating logic

Worked Example: Correlation and Causation Ids That Make a Chain Reconstructable

The single highest-leverage observability investment in an event-driven system is a disciplined event envelope. Correlation id stays constant across an entire business transaction; causation id points at the immediate parent, which lets you rebuild the exact tree of what caused what.

Code
// Every event carries the same envelope. correlationId is copied forward
// unchanged; causationId is the eventId of whatever triggered this event.
{
  "eventId":       "e3-ship-01",          // unique to this event
  "eventType":     "ShipmentDispatched",
  "eventVersion":  1,
  "correlationId": "txn-9f12",             // same for the whole business flow
  "causationId":   "e2-pay-01",            // the PaymentCaptured event
  "occurredAt":    "2026-03-04T10:24:02Z",
  "producer":      "shipping-service@2.3.1",
  "data":          { "orderId": "9f12", "carrier": "UPS" }
}

// The resulting tree is reconstructable with one query per correlation id:
//
//   e1-order-01  OrderPlaced          (causationId: null, from HTTP request)
//     +-- e2-pay-01   PaymentCaptured (causationId: e1-order-01)
//     |     +-- e3-ship-01 ShipmentDispatched (causationId: e2-pay-01)
//     +-- e2-loy-01   LoyaltyPointsAwarded (causationId: e1-order-01)
//     +-- e2-idx-01   SearchIndexUpdated   (causationId: e1-order-01)
//
// Without causationId you know these events are related. With it, you know
// which consumer's output triggered which other consumer, which is what you
// actually need at 3am when the shipment never dispatched.
The three costs of event-driven architecture laid out against their mitigations: an eventual consistency window between write and read, a causal tree reconstructed from correlation and causation ids, and schema coupling held in place by a registry with compatibility rules.
The three costs of event-driven architecture laid out against their mitigations: an eventual consistency window between write and read, a causal tree reconstructed from correlation and causation ids, and schema coupling held in place by a registry with compatibility rules.

Real-World Examples

  • GitHub's October 2018 incident is a widely studied illustration of what partial, out-of-sync state costs. A 43-second network partition between its East Coast and West Coast data centers triggered an automated MySQL failover, after which writes had landed in both regions with no clean way to merge them automatically. GitHub's public post-incident report describes more than 24 hours of degraded service, much of it spent reconciling data by hand rather than restoring availability, and it is a concrete demonstration that once a system tolerates divergence, reconciliation becomes a first-class operational responsibility rather than an afterthought.
  • OpenTelemetry, a Cloud Native Computing Foundation project formed in 2019 from the merger of OpenTracing and OpenCensus, explicitly supports trace context propagation across messaging systems and defines semantic conventions for messaging spans, including producer and consumer span relationships. Its existence and adoption reflect the industry conclusion this lesson argues for: once work crosses a broker, tracing stops being an optional nicety and becomes the only practical way to answer the question of what caused what.
WarningThe most expensive mistake in event-driven adoption is treating observability as a later phase. Correlation ids, causation ids, per-partition consumer lag alerting, and dead letter queue monitoring have to exist before the second consumer is written, not after the first production incident, because by then the events that would have explained the incident have already been produced without the metadata needed to trace them.

Review Questions & Answers

A correlation id is constant across an entire business transaction, so it answers the question of which events belong to the same flow. A causation id points at the specific event that directly triggered this one, so it answers the question of what caused what within that flow. With only a correlation id you get an unordered bag of related events and have to guess at the tree from timestamps, which is unreliable when events are produced concurrently or clocks skew. With only a causation id you can follow a chain upward one link at a time but cannot cheaply query for everything in the transaction. Together they let you retrieve the whole flow in one query and then reconstruct its exact shape.

A crashed consumer is loud: the process is gone, liveness checks fail, and somebody is paged. A lagging consumer is healthy by every naive measure, it is running, it is processing, it is not throwing errors, and yet it is falling steadily further behind. The system keeps serving increasingly stale data without any alarm, and in a durable log with a retention window, a consumer that falls behind by more than the retention period silently loses events it will never see. That is why per-partition lag has to be an alerting metric in its own right rather than something inferred from process health.

The write that succeeded recorded that the order was placed. The downstream work, charging the card, reserving inventory, generating a shipping label, is done by separate services that react to that fact rather than being called during the request, which is what lets the page respond quickly and lets the order survive even if the payment service is temporarily down. The tradeoff is that those steps complete slightly after the response is returned, so the page has to show a provisional state until they do. The design question worth agreeing on with the product owner is what the page should show at the tail: what the user sees if convergence takes not two seconds but two minutes because a consumer is backed up.

Schema coupling is explicit and machine-checkable: a registry can enforce that a new event version is backward compatible, and a consumer that breaks on a removed field fails visibly. Semantic coupling is an assumption living in consumer code that nothing declares and nothing validates, a consumer relying on two event types always arriving in a particular order, on an optional field never actually being null, on an event always being followed shortly by another. None of that appears in the schema, so the producer can satisfy every compatibility rule and still break the consumer, usually silently and usually under load, when the invisible assumption stops holding.