This demo simulates a booking application including three services:
You will need:
You can run the demo using either docker compose or executable files.
mvn clean package -DskipTests -Pdocker -Pdemo
cd ./saga-demo/saga-servicecomb-demo chmod +x saga-servicecomb-demo.sh
./saga-servicecomb-demo.sh up
./saga-servicecomb-demo.sh down
curl -X POST http://${host_address}:8083/booking/test/2/2
Check the hotel booking status with
curl http://${host_address}:8081/bookings
Check the car booking status with
curl http://${host_address}:8082/bookings
curl -X POST http://${host_address}:8083/booking/test/3/2
Check the hotel booking status with
curl http://${host_address}:8081/bookings
Check the car booking status with
curl http://${host_address}:8082/bookings
The second car booking will be marked with cancel:true
Take the spring-demo debugging as a reference.