You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by crmanoj <ma...@gmail.com> on 2013/05/24 00:49:57 UTC

Mulitcast and stopOnexception

Hi,

I have a scenario using Multicast and I want to stop the execution if any
one of the routes in multicast fails, So I used stoponException along with
multicast. Though I have appropriate error handlers written I end up
receiving 'org.apache.camel.CamelExchangeException: *Parallel processing
failed* for number 0' when there is exception at one of the sub route.

Here is my route:

onException(CustomException.class).handled(true).beanRef("myErrorHandler");

from("mycxfconsumer").multicast(MyAggregationStrategy()).stopOnException().parallelprocessing().to("direct:firstroute","direct:secondroute");

from("direct:firstroute").beanRef("firstprocessor");
from("direct:secondroute").beanRef("secondprocessor");

An exception(CustomException) is thrown in the firstprocessor and caught at
onException(), but at the end I receive this Parallel processing exception.
I want to throw my custom exception instead of this parallelprocessing
exception. I am confused here, Can someone provide your suggestions on this?

I use Camel 2.9 in fuse-esb-full-7.0.0.fuse-061.
Jdk: 1.6

Thanks in Adance!



--
View this message in context: http://camel.465427.n5.nabble.com/Mulitcast-and-stopOnexception-tp5733047.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Mulitcast and stopOnexception

Posted by crmanoj <ma...@gmail.com>.
Thank you! I do use the exception handling in my route but the problem is
when I use stoponexception, On an exception the execution stops and throws
'parallel processing exception' instead of custom exception. May be that's
the behaviour. Any thoughts on this?



--
View this message in context: http://camel.465427.n5.nabble.com/Mulitcast-and-stopOnexception-tp5733047p5733130.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Mulitcast and stopOnexception

Posted by Nibs <ni...@gmail.com>.
Hi ,

I am bit new with camel but i was  stuck in multicast exception handling
you can follow this link
http://camel.apache.org/exception-clause.html

and I will suggest you refer your customexception class to your route where
you are doing multicast
 I mean to say 

<route>
<onexception>
call your customException
<onException>

<multicast>
<to uri=""/>
<to uri=""/>
</multicast>
</route>

Don't  know how much this will help you
best of luck !!



--
View this message in context: http://camel.465427.n5.nabble.com/Mulitcast-and-stopOnexception-tp5733047p5733089.html
Sent from the Camel - Users mailing list archive at Nabble.com.