You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bstanoje <bs...@eunet.rs> on 2013/10/14 17:13:39 UTC

Headers not correctly propagated to the errorHandler on split()

Hi,

I have a scenario where splitter runs with
parallelProcessing().shareUnitOfWork().stopOnException(). It seems that the
message headers/properties are not correctly propagated to the errorHandler
if simultaneously more Exceptions occur (see the UnitTest attached). 

SplitterStopOnExceptionParallelWithExceptionTest.java
<http://camel.465427.n5.nabble.com/file/n5741542/SplitterStopOnExceptionParallelWithExceptionTest.java>  

Actually every Exchange that reaches the ErrorHandler gets the same values
for headers/properties. And also what I’m seeing is that only one
error-exchange (as expected with shareUnitOfWork()) reports the Error to the
Parent-UnitOfWork  but the rest of them are not. What exactly is expected
behavior in that case?

Thanks, best regards,
Boris



--
View this message in context: http://camel.465427.n5.nabble.com/Headers-not-correctly-propagated-to-the-errorHandler-on-split-tp5741542.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Headers not correctly propagated to the errorHandler on split()

Posted by bstanoje <st...@gmail.com>.
Ok, it’s actually other way around. The missmatch of header/property value
with actuall Exception message comes with the fact that the shared
UnitOfWork collects all the causes (CamelUnitOfWorkException) in the list
and propagates only the first one (causes.get(0)) from the causes-list. 

This can produce the wrong response that I’m having -> each splitted
sub-exchange has ist own „request-id“ and it replies to the client with
wrong exception-message for the given „request-id“. Not nice… any
suggestions how to avoid this?

Thanks, cheers,
Boris



--
View this message in context: http://camel.465427.n5.nabble.com/Headers-not-correctly-propagated-to-the-errorHandler-on-split-tp5741542p5741842.html
Sent from the Camel - Users mailing list archive at Nabble.com.