camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel - Hystrix
Date Fri, 04 Nov 2016 14:30:15 GMT
There was a bug fixed recently in camel-hystrix so you can try 2.18.1
when its released or with the latest source code you can build
yourself


On Fri, Nov 4, 2016 at 3:20 PM, r_karthik1 <reachkarthikr@gmail.com> wrote:
> I am new to Camel and Hystrix, I am trying to imple hystrix in my project.
> Before making sure I can move with hystrix for circuit break scenarios. I
> tried the following with give hystrix eample.
>
> When I enable the circuitBreakerForceOpen, its not even entering into the
> Bean that I defined. myunderstanding with circuitBreakerForceOpen is enabled
> with irrespective of error scenario it has to enter into short circuit path
> (i.e. into testBean) but its not. Do I am missing any configuration or I mis
> understood the property. Any help would be appericiated
>
>  @Override
>     public void configure() {
>         // you can configure the route rule with Java DSL here
>         from("timer:trigger?period=1s").streamCaching()
>             .bean("counterBean")
>             .log(" Client request: ${body}")
>             .hystrix()
>                 .hystrixConfiguration().
>                 circuitBreakerForceOpen(true).end()
>                 .to("http://localhost:9090/service1")
>           //  .onFallback()
>             // we use a fallback without network that provides a repsonse
> message immediately
>             //    .transform().simple("Fallback ${body}")
>                //.transform()//simple("${bean:testBean?method=testCall}")
>             .onFallbackViaNetwork()
>                 // we use fallback via network where we call a 2nd service*/
>                 .to("http://localhost:7070/service2")
>                 .end()
>                 .log("Client response: ${body}");
>     }
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Hystrix-tp5789751.html
> Sent from the Camel - Users 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