Kafka with Spring Boot: Make ShopStream Event-Driven
Topics covered
Distributed Transactions Idempotency & Exactly-Once Kafka Message Queues & Pub/Sub Resilience: Circuit Breakers & Retries Sharding & Partitioning
This course includes
- 6 lessons across 3 modules
- Hands-on coding exercises
- Downloadable resources & code
- Full GitHub repository access
- Certificate of completion
- 12 months of access
Why This Course?
ShopStream's order-service calls fulfillment over HTTP: when fulfillment is slow, checkout is slow; when it is down, orders fail. Most Kafka tutorials stop at "send a message". This one breaks things on purpose — a stopped consumer, a wrong partition key, a slow consumer that triggers a rebalance storm, a broker killed mid-write, a crash between a database commit and a publish — and measures what each failure costs in lost, duplicated or out-of-order orders. Then you fix each one with the setting or pattern production teams use.
What You'll Build
Two Spring Boot 3.5 services — order-service and fulfillment-service — talking through Apache Kafka 3.9 in KRaft mode: keyed order events on a 6-partition topic, a consumer group of three, a 3-broker cluster with acks=all and an idempotent producer, a transactional outbox backed by a database, a dead-letter topic and a lag alert. Every lesson ends with a demo that prints real numbers and a verify script that gives you a completion code.
Who Should Take This Course?
Backend engineers who use Spring Boot and want to use Kafka without surprises.
Engineers preparing for system design interviews who need to explain ordering, delivery guarantees and the outbox pattern with evidence.
Anyone who finished "Scale ShopStream" (step 1 of the free path) and wants the event-driven version.
What Makes This Course Different?
No Docker, no cloud account: each lesson's start.sh downloads Kafka once and runs it locally or in the browser sandbox. Each lesson has a build, a deliberate break and a measurement — for example, killing the leader broker during 20,000 orders: acks=1 lost 65 acknowledged orders, acks=all without idempotence delivered 449 twice, and the safe producer lost and duplicated none.
What's Included
Repository
Run it on your machine (Linux, macOS or WSL; needs Python 3.10+ and Redis):
git clone https://github.com/sysdr/shopstream-kafka-spring-boot.git
cd shopstream-kafka-spring-boot
bash test_all.sh # runs all lessons, or: cd lessons/lesson-1 && bash start.shIn the sandbox, run: cd lessons/lesson-1 && bash start.sh
Prerequisites
Basic Java and Spring Boot (controllers, configuration properties).
A terminal. Java 17+, Maven 3.8+ and Python 3 if you run locally; the browser sandbox has everything.