camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: aggregator - error handling default does not propogate error
Date Sat, 09 Apr 2011 08:26:12 GMT
Hi

Yeah that's intended.

Enrich and PollEnrich is like a single step (similar to To) and in
case of an exception the exception is thrown and handled directly by
the Camel error handler.

Where as the complicated EIPs such as multicast, splitter, recipient
list spin of X number of new exchanges which need to be merged and
handled by end users. And in case of exception(s) occurs then the end
user deal with that in the aggregator. And there is the
stopOnException option which controls if the EIP should stop
immediately if an exception was thrown and not handled, or continue.


The Enrich and PollEnrich still allows end user to "merge" the
resource, although they by default just grab and "override" the polled
resource with the current message. But you can "merge" this as an end
user and yes they use the same API - AggregationStrategy.


You are welcome to add notes to the wiki for the Content Enricher EIP
about this fact.


On Fri, Apr 8, 2011 at 3:37 PM, Christian Mueller
<christian.mueller@gmail.com> wrote:
> Claus, this is unfortunately not the same behavior we found out with the
> enrich processor (which also use the AggregationStrategy).
> We can reproduce the following behavior (with Camel 2.6):
> - If the exception is handled, the exception is not anymore set in the
> exchange (exchange.getException() as you suggested in your book doesn't
> work). We have to grab the exception from the exchange property
> Exchange.CAUSED_EXCEPTION.
> - If the exception is not handled, the AggregationStrategy is not called.
>
> Please see also also my post at [1] where I got no response... :-(.
>
> Is this the expected behavior (and we have to document it) or should I raise
> a JIRA for it?
>
> Thank you in advance,
> Christian
>
> [1]
> http://camel.465427.n5.nabble.com/Behavior-of-AggregationStrategy-in-conjunction-with-the-enrich-DSL-the-onException-definition-and-ann-td3695716.html
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/aggregator-error-handling-default-does-not-propogate-error-tp4283684p4290872.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message