Hi there!
Your task is to design and implement three Spring Boot microservices that communicate using event choreography as the primary integration pattern.
This project is a sandbox for architecture mastery, event-driven design, and production-grade messaging patterns (Inbox/Outbox).
It’s also a perfect chance to create conference/blog-worthy material from the experience.
Design and implement an architecture where:
- Three independent microservices work together through domain events (no central orchestrator)
- Each service publishes and consumes events in a loosely coupled way
- Inbox and Outbox patterns are implemented for reliability
- Observability is built in from the start
- Application is fully tested (whatever that means to you)
This is not just about making code run — it’s about:
- Architecture clarity: clear domain boundaries, no leaky abstractions
- Loose coupling: services know nothing about each other’s internals
- Reliability: events are never lost or duplicated without control
- Observability: trace the life of a single request/event across services
- Storytelling: be able to explain the why of each decision (conference-level clarity)
Think about:
- How to structure event payloads for forward compatibility
- When to use synchronous calls vs events
- How Inbox/Outbox patterns improve reliability — and their trade-offs
We’ll simulate a simple Order Processing System:
- Receives new orders
- Publishes
OrderCreatedevents - Listens for
OrderShippedevents to update status
- Listens for
OrderCreatedevents - Reserves stock & publishes
StockReservedorStockUnavailable
- Listens for
StockReservedevents - Prepares shipment & publishes
OrderShipped
- Java 21+
- Spring Boot 3.x
- Maven
- Spring Cloud Stream (or Kafka client)
- Testcontainers (Kafka)
- Micrometer Tracing
- PostgreSQL (for Inbox/Outbox)
You’ll create one ADR per key decision:
- ADR #1 — “Event choreography as primary integration style”
- ADR #2 — “Use of Inbox pattern for idempotent event consumption”
- ADR #3 — “Use of Outbox pattern for reliable event publishing”
- ADR #4 — “Service boundaries & domain ownership”
- ADR #5 — “Observability strategy (tracing & logging)”
- ADR #6 — "Error handling"
ADR examples: https://github.com/joelparkerhenderson/architecture-decision-record
- 20-minute presentation (lightning talk):
- Choreography — pros/cons, example flow
- Orchestration — pros/cons, example flow
- Inbox pattern — when to use, trade-offs
- Outbox pattern — when to use, trade-offs
- Set up Maven parent project + modules for each service
- Implement Order Service basic CRUD &
OrderCreatedevent publishing - Implement Kafka + Outbox pattern in Order Service
- ADR #1 & ADR #3 complete
- ADR #5 complete
- Implement Inventory Service with listener for
OrderCreatedevents - Apply Inbox pattern to guarantee idempotency
- Publish
StockReservedorStockUnavailable - ADR #2 complete
- Implement Shipping Service that listens for
StockReserved - Publish
OrderShippedevent - Wire Order Service to consume
OrderShippedto close the loop - ADR #4 complete
- Prepare a conference-style slide deck (e.g. "Top 4 Architecture Patterns for Event Driven Applications")
- Explain the architecture, trade-offs, and lessons learned
- Use Kolbe cycle to tell the story (start with pain point)
🔍 Zipkin → localhost:9411 (distributed tracing)
📊 Grafana → localhost:3000 (metrics dashboards)
🧪 Kibana → localhost:5601 (log search)
📈 Prometheus → localhost:9090 (metrics collection)
🎛️ Kafka UI → localhost:8090 (message queue monitoring)
🔧 Order Service Actuator → localhost:8081/actuator (application metrics)
🔧 Inventory Service Actuator → localhost:8082/actuator (application metrics)