concept Hystrix in category camel

appears as: Hystrix, Hystrix
Camel in Action

This is an excerpt from Manning's book Camel in Action.

Hystrix is a latency and fault-tolerant library designed to isolate points of access to remote services and stop cascading failures in complex distributed systems where failures are inevitable. Hystrix provides the following:

Using Hystrix in Camel routes is so easy, you need just a few lines of code:

public void configure() throws Exception { from("direct:start") .hystrix()     #1 .to("bean:counter") .end()     #2 .log("After calling counter service: ${body}"); } #1 Hystrix EIP #2 End of Hystrix block

In the route, you use Hystrix to denote the beginning of the protection of Hystrix. Any of the following nodes are run from within HystrixCommand. In this example, that would be calling the counter bean. To denote when the Hystrix command ends, you use end ❷ in Java DSL, which means the log node is run outside Hystrix.