camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nathanwray <nab...@detroitsci.com>
Subject Re: onException and doTry
Date Thu, 16 Oct 2014 13:30:22 GMT
A little further digging.  I added some debugging output to
incrementRedeliveryCounter and found the CamelRedeliveryCounter header is
missing on the redelivery attempt, I see the following:

2014-10-16 09:01:48,976 [CamelJettyClient(0x106898e3)-88] DEBUG
camel.processor.RedeliveryErrorHandler in incrementRedeliveryCounter
2014-10-16 09:01:48,976 [CamelJettyClient(0x106898e3)-88] DEBUG
camel.processor.RedeliveryErrorHandler !!! redelivery counter header was
NULL
2014-10-16 09:01:48,977 [CamelJettyClient(0x106898e3)-88] DEBUG
camel.processor.RedeliveryPolicy in shouldRedeliver, redeliveryCounter = 1
2014-10-16 09:01:48,977 [CamelJettyClient(0x106898e3)-88] DEBUG
camel.processor.RedeliveryPolicy maxRedeliveries is 2, returning true

inside route2, I had a statement that removed the Camel headers before
calling a remote web service (as recommended) so that Jetty doesn't get
tripped up by the old URI, URL settings:

			<removeHeaders pattern="Camel*"/>
			<to uri="jetty:{{vendor.uri}}?httpClient.timeout=100"/>

Apparently this destroys the redelivery count, removing it corrected the
issue.  I would consider this a defect that an inner route (with
useOriginalMessage=true) can destroy the redelivery count.

I changed it to:
			<removeHeaders pattern="Camel*" excludePattern="CamelRedeliveryCounter"/>

And the issue went away, it now redelivers twice and then fails as designed.





--
View this message in context: http://camel.465427.n5.nabble.com/onException-and-doTry-tp5757602p5757629.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message