camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: New camel-hystrix component
Date Wed, 06 Apr 2016 06:43:34 GMT
There is some pros with being an endpoint configuration only, as it
can make it easy for tooling and some developers to use it (when they
are used to configure uris, and just use from -> to -> to etc). I
guess the bit unusual part is that you refer to endpoint by id's which
is not so commonly in use by Camel.

You could also have CB as a kind of error handler, aka onException,
but have it as onCircuitBreaker, where you can setup those breaker
configs and fallback routes / endpoint etc. And whether to use a
fallback or reject or whatnot.

Just a quick pseudo code / braindump

<onCurcuitBreaker threshold="2" halfOpenAfter="1000">
   <exception>IOException</exception>
   <to uri="bean:fallbackStuff"/>
</onCurcuitBreaker>



On Mon, Apr 4, 2016 at 6:07 PM, Preben.Asmussen <pras@dr.dk> wrote:
> Hi bibryam
>
> At first glance it looks a bit intrusive when the usual endpoints are
> 'wrapped' in the hystrix endpoint.
>
> Could it be something like -> psudo code
>
> <camelContext id="hystrix-producer"
> xmlns="http://camel.apache.org/schema/blueprint">
>         <hystrix>
>            <from=&quot;run&quot;/>
>            <fallback=&quot;http4://www.google.com&quot;/>
>             .............. other options
>         </hystrix>
>
>         <route>
>           <from
> uri="timer://local?fixedRate=true&amp;period=50&amp;repeatCount=5"/>
>
>
>           <to id="run" uri="http4://localhost"/>
>
>           <to uri="log:hystrix?level=INFO&amp;showHeaders=true"/>
>       </route>
>   </camelContext>
>
> /Preben
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/New-camel-hystrix-component-tp5770955p5780454.html
> Sent from the Camel Development mailing list archive at Nabble.com.



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

Mime
View raw message