camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAMEL-1638) AggregatorStrategy - should also be invoked for the first exchange
Date Sat, 23 May 2009 07:59:50 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51857#action_51857
] 

Claus Ibsen commented on CAMEL-1638:
------------------------------------

But Willem you would like to do you code in one place.

So if you need to count the number of aggregated methods, or do some custom changes on all
aggregated exception you can do all that in the same method.

If we skip the very first exchange then you cannot do that. And if you had to do a visit pattern
afterwards that might be to late as you have already aggregated the incoming exchanges. So
its a chicken and egg situation.

So IMHO the best solution is to also pass in the first exchange in this callback. That gives
full power to the end user.

> AggregatorStrategy - should also be invoked for the first exchange
> ------------------------------------------------------------------
>
>                 Key: CAMEL-1638
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1638
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.0-M1, 1.6.1
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>
> Using aggregator, splitterl, multicast etc. that supports {{AggregatorStrategy}} all
have the flaw that they skip invoking this interface callback for the very first exchange.
> This hazzles the end users implementing this interface if they are to be able to traverse
all the exchanges, to eg summing a total amount or the likes.
> And its also a bit confusing as well why the first one is skipped.
> And if you aggregator out of order then you dont know which one was the first exchange.
> So we should invoke this callback always. And the first time the {{oldExchange}} parameter
is null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message