camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srivatsa Katta <vatsa.ka...@gmail.com>
Subject Changing retry handler for http component
Date Sun, 30 Aug 2009 15:59:07 GMT

Hi,

Am using http component and the route looks something like this.

from("direct:client").to("http://myhost:8080/?
throwExceptionOnFailure=false");

If the server is down/not reachable, the http component does retry for 3
times (as observed from the logs) and then throws up the connection time out
exception.

Yes there is a way to set timeout option on http component, but how do I set
a custom http client retry handler. If I had to do this for commons http
client programaticaly, it can be done like shown below

httpclient.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new
DefaultHttpMethodRetryHandler(0, false));

How do I do this configuration for http component in camel ??

One way I could think of as described in http component documentation,
override the httpComponent settings in the spring.xml by setting params,
connection manager etc. Was just wondering is there any simpler way ??

Any help appreciated.

Cheers!!
Katta


-- 
View this message in context: http://www.nabble.com/Changing-retry-handler-for-http-component-tp25139892p25139892.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message