camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: HttpProducer incorrect behaviour
Date Sat, 09 Aug 2008 07:00:00 GMT
Hi Bill

Good spots. Could you report this as a bug in the JIRA? Then it's not forgotten.

And if you fancy, then patches or any kind of contributions is much welcome.

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: tourist604 [] 
Sent: 8. august 2008 20:44
Subject: HttpProducer incorrect behaviour


I believe there is incorrect flow in the HttpProducer which can subvert
error handling in the route:

in Camel 1.4.0 in HttpProducer on line 76 a "blank" out message is set on
the exchange:

Message out = exchange.getOut(true);
        try {
            int responseCode = httpClient.executeMethod(method);

1. If an IO error occurs on connect, the out message will be passed to the
error handling code and if the originating endpoint was a JmsMessage it will
cause an NPE when JmsMessage.getMessageId() is called. It also obscures the
offending message I believe.
2. A similar situation will happen if the HTTP service returned an error
code; the out message will contain a reply message even though the
processing resulted in an error.

Perhaps, I am missing also how to get a hold of the original Exchange and
Message if the route execution resulted in a "logical" error. The original
Message can then be squirrelled away for later retries for example.

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

View raw message