# kafka
8 posts
Spring Boot + Kafka — Producer, Consumer & Dead Letter Topics
Integrate Apache Kafka with Spring Boot 4 — producer configuration, consumer groups, error handling, dead letter topics, and JSON serialization.
Saga Pattern — Managing Distributed Transactions
How to implement the Saga pattern for distributed transactions in microservices — choreography vs orchestration, compensation, and practical implementation with Kafka.
CQRS with Spring Boot, Kafka & MongoDB — Part 5: Putting It All Together
Docker Compose setup, end-to-end flow walkthrough, integration tests with Testcontainers, and a production readiness checklist for the complete CQRS system.
CQRS with Spring Boot, Kafka & MongoDB — Part 4: The Hard Parts
Eventual consistency, idempotent consumers, schema evolution, the outbox problem — the real-world challenges that make CQRS hard and how to handle them.
CQRS with Spring Boot, Kafka & MongoDB — Part 3: Query Side — Reads at Scale
Building the query service — consuming Kafka events, building read-optimized projections, and serving fast queries from MongoDB.
Event-Driven Architecture — When and Why (Not Just Kafka)
Understand event-driven architecture beyond the buzzwords — events vs commands, messaging patterns, when to use it, and when synchronous calls are better.
CQRS with Spring Boot, Kafka & MongoDB — Part 2: Command Side — Writes Done Right
Building the command service — accepting orders, validating business rules, persisting to MongoDB, and publishing domain events to Kafka.
CQRS with Spring Boot, Kafka & MongoDB — Part 1: What is CQRS and why you need it
Understanding Command Query Responsibility Segregation, when it makes sense, and how Spring Boot, Kafka, and MongoDB fit together in a CQRS architecture.