Fault Tolerance with Hystrix code example
Example: Implementing Fault tolerance with hystrix
@GetMapping("/fault-tolerance-example")
@HystrixCommand(fallbackMethod="fallbackRetrieveConfguration")
public LimitConfiguration retrieveConfiguration() {
throw new RuntimeException("Not Available");
}
public LimitConfiguration fallbackRetrieveConfiguration() {
return new LimitConfiguration(999, 9);
}