Hi chaps, I'm also not very happy with the way endpointId are part of the hystrix URL but that was the only non-intrusive way I manged to implement it atm. Keep in mind that we want both Java and XML dsl solution. So if you have any ideas to make it easier to use, feel free to work on it. I won't have bandwidth to improve it further in near future.
The previous time when I implemented the circuit breaker, the most appropriate location I found end up being the load balancer. It did nicely fit there, bit I think it is still not natural to say that CB is a LB strategy. This time I decided to use a component as I think hystrix is only one implementation of CB. In addition, hystrix does not implement only CB, but more and more things, which I find confusing. It does bulkheading (which is fine), but also request collapsing, and also caching. For something like request collapsing, the more natural way would be to have aggregator in Camel, and for the caching it would be better if we had caching DSL with various implementations (very importantly: distributed cache). I think for CB we need a new EIP, and not LB and a component. Hystrix can be an implementation of the EIP. And it might be better if the caching, request collapsing concepts are not mixed with the CB EIP. Cheers, On 6 April 2016 at 07:43, Claus Ibsen <claus.ib...@gmail.com> wrote: > 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 <p...@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="run"/> >> <fallback="http4://www.google.com"/> >> .............. other options >> </hystrix> >> >> <route> >> <from >> uri="timer://local?fixedRate=true&period=50&repeatCount=5"/> >> >> >> <to id="run" uri="http4://localhost"/> >> >> <to uri="log:hystrix?level=INFO&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 -- Bilgin Ibryam Camel Committer at ASF & Integration Architect at Red Hat Blog: http://ofbizian.com | Twitter: @bibryam Camel Design Patterns https://leanpub.com/camel-design-patterns Instant Apache Camel Message Routing http://www.amazon.com/dp/1783283475