camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Läubrich (JIRA) <j...@apache.org>
Subject [jira] [Reopened] (CAMEL-11664) Split proceeds even if onPrepare throws Exception
Date Mon, 04 Sep 2017 17:20:00 GMT

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

Christoph Läubrich reopened CAMEL-11664:
----------------------------------------

This don't fix it. If the prepare fails and the split fails it might break out but you have
no idea why your prepare was never called since the exception is completely ommited!
In case where the missing onprepare does not lead to an exception in the split the split succeeds
and is performed with wrong/unprepared data.
Think of a switch with a default case inside the split, the on prepare computes a value used
in the switch.
If onPrepare fails, the splitt completely succeeds but always fall through to the default
case without any notice. This is a real pain to debug and prone to unnoticed errors.

Wha is it considered as "not a problem" when Camel silently ignores this case?

> Split proceeds even if onPrepare throws Exception
> -------------------------------------------------
>
>                 Key: CAMEL-11664
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11664
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.16.2
>            Reporter: Christoph Läubrich
>            Assignee: Claus Ibsen
>
> With the [splitter|http://camel.apache.org/splitter.html] you can set an onPrepareRef
to allow custom preprocessing.
> If this processor fails with an exception, the splitting still proceeds leading to hard
to track problems becuase the splitter receives messages that are not (or only partially)
prepared! Even setting an exception does not let camel fail the split.
> If the prepare step fails camel should fail the split with the exception thrown from
onPrepare.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message