Backend & Microservices · 2026
Distributed Transactions with the Saga Pattern
A microservices project that keeps order and inventory services consistent using a choreography-based saga with Java 17, Spring Boot 3.3 and Apache Kafka.
What I did
- The order service creates an order in PENDING state and publishes an event to Kafka.
- The stock service checks inventory: if sufficient it decreases stock (COMPLETED), otherwise it rejects the transaction (CANCELLED).
- Without a central orchestrator (choreography), the order is updated to its final state based on the stock service's reply.
- Each service has its own isolated H2 database; the infrastructure runs with Docker Compose.
Tech stack
- Java 17
- Spring Boot 3.3
- Apache Kafka
- H2
- Docker Compose
Related projects
Java 17Spring BootSpring Cloud
Backend & Microservices · 2025
Micro LMS – Spring Cloud Microservices
A modular learning management system made of user, course, enrollment and notification services, built on Eureka, Config Server and API Gateway.
Details →JavaSpring BootEureka
Backend & Microservices · 2025
Weather Advisor – Service Discovery & Fault Tolerance
Spring Boot services with Eureka service discovery, a Resilience4j circuit breaker and Zipkin distributed tracing, started with Docker Compose.
Details →Node.jsRabbitMQMongoDB
Backend & Microservices · 2025
E-Commerce Microservices (Node.js)
Node.js microservices with a RabbitMQ message queue, a service registry and an API Gateway, running on MongoDB and PostgreSQL with Docker Compose.
Details →