Updating hystrix configuration at runtime

2017-04-05 Thread Abhishek.Jha09
Is there a way to update hystrix configuration at runtime? I am using Java DSL to create route and referring to a hystrix configuration bean in SimpleRegistry. Nothing seems to change when I modify this bean and then do camelContext.addRouteDefinition(). -- View this message in context:

Re: Unable to update httpclientconfigurer instance on dynamic to endpoint.

2017-03-29 Thread Abhishek.Jha09
So from what I observed, toD() creates multiple enpoints for the same route. If I remove the endpoints and then add the route definition again, I can use the updated HttpClientConfigurer instance without having to create new component. > You need to define a new http4 component if you have

Re: Unable to update httpclientconfigurer instance on dynamic to endpoint.

2017-03-28 Thread Abhishek.Jha09
I was thinking it was more of a problem related to toD() rather than http4 component. That's because when I use to() for creating http4 endpoint, I am able to change the instance of HttpClientConfigurer easily at runtime. Anyways, using the way you're suggesting, i.e., creating new http4

Adding SimpleRegistry to Camel Context post Camel Context creation.

2017-03-28 Thread Abhishek.Jha09
I know we can add Simple Registry to camel context using this- CamelContext camelContext = new DefaultCamelContext(SimpleRegistry.class); But, is there a way to add SimpleRegistry other than the way mentioned above? I ask because my camel context is initialized by Spring. -- View this message

Re: Unable to update httpclientconfigurer instance on dynamic to endpoint.

2017-03-28 Thread Abhishek.Jha09
So apparently, got this to work by overriding the httpclientconfigurer instance in SimpleRegistry and then adding the route again in CamelContext. However, this way is not working if I keep the httpclientconfigurer instance in spring bean registry. -- View this message in context:

Re: Unable to update httpclientconfigurer instance on dynamic to endpoint.

2017-03-23 Thread Abhishek.Jha09
ATH` header, something like: > > from("direct:a").setHeader(Exchange.HTTP_PATH, > simple("${headers.id}").to("http4://localhost8080/user/?httpClientConfigurer=myHttpConfigClient") > > zoran > > On Wed, Mar 22, 2017 at 11:23 PM, Abhishek.Jha09 > ab

Re: Exception handling with Hystrix EIP

2017-03-23 Thread Abhishek.Jha09
Hi Priyanka, So, as it happens, the exceptions captured by hystrix are present as a property of the exchange if fallback is defined otherwise, you can get it directly from exchange. Try peeking inside exchange.getProperties() and after you trigger the route and exchange.getException(). FYI,

Unable to update httpclientconfigurer instance on dynamic to endpoint.

2017-03-23 Thread Abhishek.Jha09
Hi all, Subject pretty much sums up my query. I have a route like from("direct:a").routeId("myroute") .toD("http4://localhost:8080/user/${headers.id}?httpClientConfigurer=myHttpConfigClient") I have set up "myHttpConfigClient" in SimpleRegistry in camel context. When I change the

Overriding HTTP client config while declaring routes.

2017-03-19 Thread Abhishek.Jha09
Hi, I have a web application from which I'm calling around 50-60 rest/soap apis. For this, I've created routes in JAVA DSL. Now, to have default application level timeout settings, I've done configuration like this- public class DefaultHttpClientConfig implements HttpClientConfigurer { //

How to get exception which caused the hystrix fallback?

2017-03-16 Thread Abhishek.Jha09
Hi, I'm testing hystrix along with camel routes (in JAVA DSL). So these routes are essentially of the form: [from(direct:a) .hystrix() .to("http4:localhost:8080/mock/success") .onFallBack() .process(ex -> ex.getOut().setBody("Hystrix fallback message")) .end()]