You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/04/24 17:45:13 UTC

[jira] [Resolved] (CAMEL-9876) Error handling in splitter is broken with version 2.17.0

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

Claus Ibsen resolved CAMEL-9876.
--------------------------------
    Resolution: Invalid
      Assignee: Claus Ibsen

The direct:line route uses the global error handler. You need to either inlined the direct route in the splitter, or configure the direct route to not use error handler.

Those other tests should ideally have configured the direct route to not use any error handler so its controller by the splitter.

{code}
                from("direct:start")
                    .errorHandler(deadLetterChannel("mock:dead").useOriginalMessage()
                        .maximumRedeliveries(3).redeliveryDelay(0))
                    .to("mock:a")
                    // share unit of work in the splitter, which tells Camel to propagate failures from
                    // processing the splitted messages back to the result of the splitter, which allows
                    // it to act as a combined unit of work
                    .split(body().tokenize(",")).shareUnitOfWork()
                        .to("mock:b")
                        .to("direct:line")
                    .end()
                    .to("mock:result");

                from("direct:line").errorHandler(noErrorHandler())
                    .to("log:line")
                    .process(new MyProcessor())
                    .to("mock:line");
{code}

> Error handling in splitter is broken with version 2.17.0
> --------------------------------------------------------
>
>                 Key: CAMEL-9876
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9876
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.17.0
>            Reporter: Oliver Holzmann
>            Assignee: Claus Ibsen
>
> With version 2.17.0 error handling is not triggering route specific error handler any more.
> I changed {{org.apache.camel.processor.SplitSubUnitOfWorkTest}} and defined the global error handler as route specific and amended the global error handler:
> {code}
>       public void configure() throws Exception {
>         // START SNIPPET: e1
>         errorHandler(deadLetterChannel("mock:log").useOriginalMessage()
>             .maximumRedeliveries(3).redeliveryDelay(0));
>         from("direct:start")
>             .errorHandler(
>                 deadLetterChannel("mock:dead").useOriginalMessage()
>                     .maximumRedeliveries(3).redeliveryDelay(0)).to("mock:a")
>             .split(body().tokenize(",")).shareUnitOfWork().to("mock:b")
>             .to("direct:line").end().to("mock:result");
>         from("direct:line").inheritErrorHandler(true).to("log:line")
>             .process(new MyProcessor()).to("mock:line");
>         // END SNIPPET: e1
>       }
> {code}
> The expectation is, that this shouldn't change the test results. 
> But {{testError}} fails because {{mock:dead}} is not triggered any more.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)