camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From junaid <>
Subject Catching HttpHostConnectException from Camel Restlet component
Date Wed, 01 Oct 2014 11:47:04 GMT

I am using Camel Restlet component for connecting an HTTP Server. I am
sending messages to the HTTP server using the producer Template inside a
camel Processor. 

Exchange ex = producerTemplate.request(url, body, headers);

Under normal flow operation (i.e. when the web server is available),
everything works fine. I am able to get the response as well as exception in
case of errors like 404 using ex.getException().

The problem arise when the web server gets down. In this case, none of the
exception gets caught in the exchange but the following log is printed.

WARNING: An error occurred during the communication with the remote HTTP
org.apache.http.conn.HttpHostConnectException: Connection to refused

How can I handle this particular exception through Apache Camel?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message