[jira] Created: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
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
            Reporter: Bela Vizy


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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org

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

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

err correction: re-delivers 6 times according before it goes to the default DeadLetterChannel the once more before it goes to the specified ErrorHandler. It seems like the message gets re-delivered paralel: following the default errorhandler and also following the preset error handler.

> 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
>            Reporter: Bela Vizy
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

magyardude edited comment on CAMEL-794 at 8/7/08 8:07 PM:
---------------------------------------------------------

err correction: re-delivers 6 times  before it goes to the default DeadLetterChannel, then once more before it goes to the specified ErrorHandler. It seems like the message gets re-delivered parallel: once following the default ErrorHandler policy and also following the preset error handler.

      was (Author: magyardude):
    err correction: re-delivers 6 times according before it goes to the default DeadLetterChannel the once more before it goes to the specified ErrorHandler. It seems like the message gets re-delivered paralel: following the default errorhandler and also following the preset error handler.
 

> 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
>            Reporter: Bela Vizy
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-794:
------------------------------

        Fix Version/s: 1.5.0
    Affects Version/s: 1.4.0

Target for Camel 1.5. Error handling is important that it *just works*

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

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

So far this is what I see:

The thread processor wraps everything following into a pipeline. One problem is that the "children" (the members of the pipeline) don't inherit the the settings for the Error Channel. Since the ErrorHandlerBulder is null it falls back to the default (6 re-tries, DLC). This probably can be corrected at ProcessorType.java:1610 by copying the ErrorHandlerBuilder of the parent.

But there is another problem. If we bomb in one of the members of the pipeline after the thread processor, the error handling will be executed two times: once for the member (that would be the desirable behavior) and once for the whole pipeline. Camel actually re-delivers the exchange to the first member after the thread().

Well that is it so far.  Let me know if you want me to keep poking...



> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-794:
-----------------------------------

Bela thanks for the help, much appreciated

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-794:
-----------------------------------

It might already be fixed in Camel 1.5. Using your unit test I can only get it redelivered once.

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-794:
-----------------------------------

See unit test added:
http://svn.apache.org/viewvc?view=rev&revision=686461

org.apache.camel.issues.ThreadErrorHandlerTest


> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Vizy updated CAMEL-794:
----------------------------

    Attachment: BelasThreadErrorHandlerTest1.java

Unit test to show the number of re-dliveries is one less.

> 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
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Vizy updated CAMEL-794:
----------------------------

    Attachment: BelasThreadErrorHandlerTest2.java

Unit test to test the errorHandling with thread processor.

> 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
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

magyardude edited comment on CAMEL-794 at 8/17/08 3:24 PM:
----------------------------------------------------------

More digging...

I attached 2 unit tests. The extra is that I'm counting the actual execution of the processor.

The first  is the simpler test (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).

      was (Author: magyardude):
    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
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

magyardude edited comment on CAMEL-794 at 8/17/08 3:25 PM:
----------------------------------------------------------

Unit test to show the number of re-dliveries is one less than expected..

      was (Author: magyardude):
    Unit test to show the number of re-dliveries is one less.
 

> 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
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

magyardude edited comment on CAMEL-794 at 8/17/08 3:27 PM:
----------------------------------------------------------

Unit test to show the number of re-deliveries is one less than expected.

      was (Author: magyardude):
    Unit test to show the number of re-dliveries is one less than expected..
 

> 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
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-794:
-----------------------------------

Hi Bela

Thanks for all the digging.
maximumRedelivery=0 should disable it = newer retry.

> 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
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-794:
-----------------------------------

Thanks for the unit tests. Will look into it later.

> 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
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-794:
---------------------------------

    Assignee: Claus Ibsen

> 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
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-794:
-----------------------------------

The "number of re-deliveries is one less than expected." has been fixed.

> 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
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-794:
-----------------------------------

The outstanding issue is when you configure an errorHandler *after* the *thread*.

{code}
   from(xxx)
   .thread(2)
   .errorHandler(...)
   .process(...)
{code}

Then its using the parent errorhandler and if none exists its the default error handler using DLC with 5 retries.


But setting the errorhandler *before* works as expected:
{code}
   from(xxx)
   .errorHandler(...)
   .thread(2)
   .process(...)
{code}

So we gotta figure out how Camel should handle this, and if the *after* should be supported also.

> 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
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-794) Pipeline with thread() processor also redelivers following the default policy independently from the preset errorhadling

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-794.
-------------------------------

    Resolution: Fixed

Setting error handler *after* thread is not supported. End users should set it on the correct type such as a RouteType such as the *from*.

The thread children is now also configured with the inherited error handler as suggested by Bela.

Thanks Bela for reporting and digging into this issue.

> 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
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: BelasThreadErrorHandlerTest1.java, BelasThreadErrorHandlerTest2.java
>
>
> 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.

12