Designing Event-Driven Architecture
FREE on Kindle Unlimited
AI & Technology

Designing Event-Driven Architecture

A Comprehensive Guide

By Shane Larson

$9.99

About This Book

A payment goes out. The ledger service confirms it. The fraud service, three hundred milliseconds behind, decides it shouldn't have. Somewhere between those two facts is a customer, a compliance officer, and an on-call engineer staring at a dashboard that shows every service green.

Nothing failed. That's the part nobody warns you about. Every component did exactly what it was designed to do, and the system still produced an outcome no one intended — because the design assumed a shared sense of "now" that distributed systems do not have. This is what event-driven architecture actually is on a Tuesday afternoon in production, and it looks very little like the conference talk that convinced the org to adopt it.

Kafka is on the architecture diagram. "Real-time" is in the executive deck. Event sourcing got approved because someone watched a keynote. CQRS got bolted onto a system that needed a database index. What's being built, in a lot of enterprises right now, is expensive confusion wearing the vocabulary of rigor.

The Argument

Event-driven architecture is not a technology decision. It is a decision about what your organization is willing to know, when, and with what confidence — and every hard problem downstream flows from that.

This book starts where most treatments hand-wave: the distinction between an event, a message, and a command. That sounds like pedantry until you watch a design corrode because the team used the words interchangeably for six months and ended up with a system that is neither a log nor a queue but insists on behaving like both. From there it builds outward through the distributed log as an architectural primitive — what partitions actually guarantee about ordering, and which parts of the ordering story are folklore repeated until they sound like specification.

Then it goes where the blog posts stop. Sagas and compensating actions, walked through with a payment flow that fails halfway. Schema evolution when forty consumers depend on a contract you'd like to change. Idempotency, the outbox pattern, and a straight answer about exactly-once delivery — which is a myth, and the honest version of it is more useful than the marketing version. Observability for systems where "the request" no longer exists as a coherent object to trace.

A full chapter addresses event-driven architecture in regulated industries: audit trails, retention obligations, privacy and crypto-shredding, provable ordering when a regulator asks you to prove it. That chapter comes out of running integration platforms at a financial institution handling hundreds of millions of calls a year — an environment where "eventually consistent" is a phrase you have to defend in a meeting.

And because the next generation of enterprise systems will be agentic, the book shows how events become the nervous system of AI agent architectures: coordination, memory, and the kill switch you will want before you need it.

Every technique is vendor-neutral. You'll learn to evaluate any broker or managed streaming service on its architectural properties rather than its documentation, which means the judgment survives the next major release — and the one after that.

What You'll Discover

  • Why conflating events, messages, and commands corrupts a design from the first whiteboard. The three carry different guarantees and different obligations; the vocabulary confusion is the root cause of a surprising share of production incidents.
  • What a distributed log actually promises. Partitions, ordering, replay — separated cleanly from the ordering claims that get repeated at meetups and quietly falsified under load.
  • The exactly-once myth, dismantled. What the guarantee really means, why the network won't cooperate, and how idempotency and the outbox pattern solve the problem the myth pretends to solve.
  • Event sourcing and CQRS without the cult. Each earns its complexity in specific conditions. This is the chapter that gives you language for saying no.
  • Sagas and compensating actions, step by step. A payment flow that fails in the middle, traced through the design decisions that determine whether the failure is recoverable or a phone call.
  • Contracts and schema evolution at scale. How to change a schema forty consumers depend on without a coordinated deploy and a long weekend.
  • Observability when the request stops existing. Correlation, causality, and tracing for systems that no longer have a single thread to follow.
  • Architecture that survives an audit. Retention, privacy, crypto-shredding, and provable ordering — written for people whose auditors are not hypothetical.
  • Legacy integration without fantasy. Change data capture, anti-corruption layers, and how to live with the mainframe that isn't going anywhere.
  • Events as the backbone of agent systems. Coordination, durable memory, and the containment mechanisms you build before autonomy, not after.

Why I Wrote This

I spent years as an enterprise architect watching event-driven architecture arrive in organizations as a mandate rather than a decision. Kafka would appear on a diagram before anyone could articulate what problem it solved, and the vocabulary — "real-time," "decoupled," "event sourced" — would spread faster than the understanding underneath it. Then the incidents would start, and the incidents were never about the broker. They were about ordering assumptions nobody wrote down.

What irritated me enough to write a book was the gap in the literature. There's excellent material on Kafka the product and there's high-altitude theory about distributed systems, and almost nothing in between for the person who has to design something on Monday and defend it in a review on Thursday. I wanted the book I needed when I was running integration platforms at a bank: honest about tradeoffs, specific about failure modes, unwilling to pretend exactly-once is a checkbox. This is the follow-on volume to Designing Solutions Architecture for Enterprise Integration, and it's the one people kept asking for.

Frequently Asked Questions

Do I need to read Designing Solutions Architecture for Enterprise Integration first?

No. This book stands on its own. The earlier volume covers integration patterns broadly — APIs, synchronous designs, platform strategy — while this one goes deep on the event-driven half of that territory. Reading both gives you the full arc, but starting here costs you nothing.

Is this a Kafka book?

No, and deliberately not. Kafka appears where it illustrates a concept, alongside other brokers and streaming services. The goal is to give you the criteria to evaluate any of them on architectural properties — durability, ordering, delivery semantics, operational cost — so your judgment doesn't expire when the tooling changes.

What background does it assume?

That you've built or operated distributed systems and understand what a queue is. It doesn't assume you've done event sourcing, run a broker in production, or read the academic literature on consensus. If you're an architect, senior engineer, or tech lead who can read a sequence diagram, you're the reader.

Is there code, or is it design-level?

It's a design book. There's enough concrete detail — outbox implementations, saga structures, schema evolution strategies — to act on, but the value is in the reasoning, not in copy-paste snippets that rot in eighteen months.

Does it cover regulated environments specifically?

Yes, in a dedicated chapter. Audit trails, retention windows, privacy and the right to erasure against an immutable log, crypto-shredding, and how to demonstrate ordering to someone who is empowered to fine you. It's drawn from running integration platforms in banking, where those constraints aren't theoretical.

Does it address AI agents?

It does. Agent systems need coordination, durable memory, and containment, and events turn out to be the right substrate for all three. The chapter treats agents as a distributed systems problem rather than a prompt-engineering problem — which is the framing most teams are missing.

If You Liked This, You Might Like

  • Designing Solutions Architecture for Enterprise Integration — the companion volume: integration patterns, API strategy, and platform design at enterprise scale.
  • API Driven Banking — the same regulated-environment discipline applied to financial platform design, where the constraints are auditors rather than aesthetics.
  • Escape Velocity — for the mainframe chapter's larger problem: modernizing systems that can't be turned off.
  • Loop Engineering — how self-running agent systems are actually designed, if the agentic chapter left you wanting more.

Closing

Events are facts. Facts don't get retracted, and contracts you publish are contracts you own. That's the whole discipline in two sentences — this book is what follows from taking them seriously.

More in This Genre

View all
New
The Responsibility Layer
The Responsibility Layer
What Comes After AI Agents
$6.99KU🎧
New
Ship It With AI
Ship It With AI
How Non-Technical Founders Are Building Real Products
New
The AI-Native CIO
The AI-Native CIO
How the Executive Role Is Being Rewritten by Artificial Intelligence
New
AI and the New Trade Wars
AI and the New Trade Wars
How Technology Became the World's Most Dangerous Weapon