In this example we will design a simple event-driven distrbuted system that simulate order managment system using springboot, apache-camel and saga design pattern. This is just a show case on how to use apache camel with saga in microservices.
-
Start management servers (kafka-server and LRA coordinator)
cd management
docker-compose up -d
-
Run
order-service
,customer-service
,payment-service
. -
Create a new order :
curl --location 'http://localhost:9901/api/v1/order' \
--header 'Content-Type: application/json' \
--data '{
"id":"123",
"itemName": "new item"
}'
- Get Order details :
curl --location 'http://localhost:9901/api/v1/order/123'