Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.9 KB

File metadata and controls

56 lines (36 loc) · 1.9 KB

Java version of flowing-retail/rest

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.

REST callstack

This simple call-chain is great to demonstrate various important resilience patterns.

See introduction for the storyline / patterns behind

Concrete technologies/frameworks in this folder:

  • Java 8
  • Spring Boot 1.5.x
  • Hystrix
  • Camunda 7.x

How-to run

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

Hint on using Camunda Enterprise Edition

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:

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.