Hi

We have a few attempts of a Circuit Breaker in Apache Camel

- Circuit Braker Load Balancer
- Hystrix Component

The former is a pure Camel implementation in camel-core that when the
circuit is open will reject processing.

The latter is a Camel component where you call an endpoint that then
does the CB.

However it would be great if we have a first class EIP that is a CB
that allows to plugin Hystrix.


So I started an attempt of that on a branch named hys:
https://github.com/apache/camel/tree/hys

So all you have to do is to use the new hystrixCircuitBreaker EIP (we
can rename later) in your route and then setup a fallback part, eg
just like a choice EIP works. Or maybe better think as a doTry ..
doCatch etc.

You can find two examples here

Success: 
https://github.com/apache/camel/blob/hys/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/HystrixCircuitBreakerOkTest.java

Fallback: 
https://github.com/apache/camel/blob/hys/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/HystrixCircuitBreakerFallbackTest.java


As an end user all you have to do is to add camel-hystrix to the
classpath (just like with camel-swagger-java does for api docs).

The EIP does not yet expose any configuration options for hystrix CB,
but you can configure a bunch of those, so we should allow some level
of configuration.


We should also make it possible to integrate this with the hystrix
dashboard, so you can see the state of all those from your Camel apps.
https://github.com/Netflix/Hystrix/tree/master/hystrix-dashboard











-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to