This example demonstrates stateful resilience patterns in a REST environment. A payment (micro-)service can retrieve payments if called via REST. It requires an upstream REST service to charge credit cards.
This simple call-chain is great to demonstrate various important resilience patterns.
See introduction for the storyline / patterns behind
- Java 8
- Spring Boot 1.5.x
- Hystrix
- Camunda 7.x
First you have to startup the stripe fake server, as this handles the credit card payments.
mvn -f ../stripe-fake/ exec:java
Now you can run the payment service itself
mvn exec:java
Now the different versions of the payment service are available:
You now can issue a PUT with an empty body:
curl \
-H "Content-Type: application/json" \
-X PUT \
-d '{}' \
http://localhost:8100/payment/v1
For Camunda there is an enterprise edition available with additional features in Cockpit (the monitoring tool). It is quite handy to use this when playing around with the example. You can easily switch to use enterprise edition:
- Get a trial license if you don't have a license yet: https://camunda.com/download/enterprise/
- Adjust Camunda version used in pom: ./pom.xml#L12, ./pom.xml#L50
Note that you do not need the enterprise edition to run the examples, the community edition will also do fine. But because of less features you do not see historical workflow instances - and that means you do not see that much in Camunda Cockpit if everything runs smoothly.