UmurInan
Back to Books
Event-Driven Architecture with Spring Boot 4.x and Kafka 4.x cover
Kafka Spring Boot Event-Driven

Event-Driven Architecture with Spring Boot 4.x and Kafka 4.x

Sixteen chapters covering event-driven architecture from first principles to production operations. Builds real event-driven systems with Spring Boot 4 and Kafka, then covers CQRS, event sourcing, the saga pattern, idempotency, schema evolution, and observability. Every pattern is implemented and tested with working code.

DOI 10.5281/zenodo.20357054


What you'll learn

Kafka topics, partitions, consumer groups, and KRaft mode without ZooKeeper Sending and receiving events with Spring Kafka and @KafkaListener CQRS: separating read and write models with eventual consistency Event sourcing: the event store, aggregates, snapshots, and GDPR The saga pattern: choreography vs orchestration with compensating transactions The outbox pattern and change data capture for reliable event publishing Idempotency keys and deduplication under at-least-once delivery Schema evolution with Avro and the Confluent Schema Registry Testing event-driven systems with EmbeddedKafka and Testcontainers

Table of Contents

  • 01 Why Event-Driven Architecture?
  • 02 Apache Kafka from the Ground Up
  • 03 Spring Boot 4 + Kafka
  • 04 CQRS: Separating Reads from Writes
  • 05 Event Sourcing
  • 06 CQRS + Event Sourcing Together
  • 07 The Saga Pattern
  • 08 Eventual Consistency
  • 09 The Outbox Pattern
  • 10 Idempotency and Duplicate Handling
  • 11 Schema Evolution
  • 12 Observability
  • 13 Testing Event-Driven Systems
  • 14 Cache Coherence in Distributed Read Models
  • 15 Migrating to Event-Driven Architecture
  • 16 Multi-Tenant Event-Driven Systems