LAB-Using Hystrix As Circuit Breaker: in This Lab, You Will Be Working On Projects Under 05-Hystrix Working Set
LAB-Using Hystrix As Circuit Breaker: in This Lab, You Will Be Working On Projects Under 05-Hystrix Working Set
In this lab, you will be working on projects under 05-hystrix working set.
Like in earlier lab exercise, make a cargo booking and make a note of bookingId in response.
{
"bookingAmount": 100,
"originLocation": "BLR",
"destLocation" : "DEL",
"destArrivalDeadline" : "2020-01-28"
}
Now make a request to route cargo from swagger ui using the bookingId
You should get 500 status code and error message because routing-service is not started.
Like in earlier lab exercise, make a cargo booking and make a note of bookingId in response.
{
"bookingAmount": 100,
"originLocation": "BLR",
"destLocation" : "DEL",
"destArrivalDeadline" : "2020-01-28"
}
Now make a request to route cargo from swagger ui using the bookingId
You should get 503 status code and error message as shown below:
Visit the following page to see configuration parameters for Hystrix Command
https://github.com/Netflix/Hystrix/wiki/Configuration
Hystrix Dashboard
Open pom.xml and observe that we have already added hystrix dashboard and turbine dependency.
Open application.yml under src/main/resources and observe that the serverport is configured as
5555.
Run HystrixDashboard.java .
You should see Circuit status for all the Hystrix commands and Thread pool status of first app
What are the number of failures which will open the circuit?
You should see Circuit status for all the Hystrix commands and Thread pool status of first app