This application demonstrates how to maintain data consistency in an Java/JDBC/JPA-based microservice architecture using sagas.
The application consists of two services:
-
Order Service
- creates orders -
Customer Service
- manages customers
Both services are implemented using Spring Boot, JPA and the Eventuate Tram Saga framework
The Order Service
uses a saga to enforce the customer’s credit limit when creating orders.
To learn more about why you need sagas if you are using microservices:
-
the Saga pattern
-
read about sagas in my Microservice patterns book