You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by tourist604 <id...@skrypnyk.net> on 2008/08/08 20:44:07 UTC
HttpProducer incorrect behaviour
Hi,
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.
Cheers,
--Bill
--
View this message in context: http://www.nabble.com/HttpProducer-incorrect-behaviour-tp18897168s22882p18897168.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: HttpProducer incorrect behaviour
Posted by tourist604 <id...@skrypnyk.net>.
Sorry, never mind: figured it out :)
JIRA issue posted: CAMEL-807
--
View this message in context: http://www.nabble.com/HttpProducer-incorrect-behaviour-tp18897168s22882p18917724.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: HttpProducer incorrect behaviour
Posted by tourist604 <id...@skrypnyk.net>.
Sorry, I am sure I am missing something obvious but I can't find a reference
on how to post to Camel's JIRA (do I need additional registrations?). Can
you give me a quick pointer please.
Thanks,
--Bill
--
View this message in context: http://www.nabble.com/HttpProducer-incorrect-behaviour-tp18897168s22882p18917648.html
Sent from the Camel - Users mailing list archive at Nabble.com.
RE: HttpProducer incorrect behaviour
Posted by Claus Ibsen <ci...@silverbullet.dk>.
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.
http://activemq.apache.org/camel/contributing.html
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: tourist604 [mailto:idea@skrypnyk.net]
Sent: 8. august 2008 20:44
To: camel-user@activemq.apache.org
Subject: HttpProducer incorrect behaviour
Hi,
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.
Cheers,
--Bill
--
View this message in context: http://www.nabble.com/HttpProducer-incorrect-behaviour-tp18897168s22882p18897168.html
Sent from the Camel - Users mailing list archive at Nabble.com.