camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bela Vizy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling
Date Sun, 17 Aug 2008 22:21:52 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45014#action_45014
] 

Bela Vizy commented on CAMEL-794:
---------------------------------

More digging...

I attached 2 unit tests. The first  is the simpler (BelasThreadErrorHandlerTest1.java). It
demonstrates that the exchange gets delivered 1 less times than the number specified in the
errorHandler statement. This happens even without the thread processor. By the way am I right
here? We mean "re"-delivery, meaning executing the processor, where the failure occurred,
once (failure) + plus the number of "re" times, right? Btw with zero doesn't even call the
processor. 

The second unit test is about the thread processor behavior (BelasThreadErrorHandlerTest1.java).
The error handlig behavior is different depending where you put the errorHandler call inside
the route: before or after. If it comes before the only problem is the one less re-delivery
(see above in the first unit test). If you put the errorHandler spec after the thread processor
it gets ignored and Camel will redeliver 5 times followed by the default DLC (one less again
because 6 is the default).

> Pipeline with thread() processor also redelivers following the default policy independently
from the preset  errorhadling 
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-794
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-794
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Bela Vizy
>             Fix For: 1.5.0
>
>
> When using the thread processor in a simple pipeline, the exchange will be redelivered
6 times (default policy) along with the preset errorhandler settings. The code below will
re-deliver 6 times to the default DeadLetterChannel and once to the log:errorTester.
>     	errorHandler(deadLetterChannel("log:errorTester?level=ERROR").maximumRedeliveries(1));
> 		
>     	from("seda:whatEver")
>         .thread(2)
>        	.process(new Processor() {
>         		public void process(Exchange exchange) throws Exception {
>         			System.out.println("### Exchg : " + exchange.getExchangeId());
>         			throw new Exception("Kaboom 2!");
>         		}
>         });

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message