You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2015/03/04 07:02:05 UTC

[jira] [Commented] (CAMEL-8423) Enhance Aggregate EIP to let AggregationStrategy to allow it to determine if aggregation is complete

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

Claus Ibsen commented on CAMEL-8423:
------------------------------------

Notice this is only for the aggregate eip. You may use aggregation strategy in enrich / pollEnrich etc but they dont have completion support as they dont need it.

> Enhance Aggregate EIP to let AggregationStrategy to allow it to determine if aggregation is complete
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-8423
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8423
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Daniel Kulp
>            Assignee: Daniel Kulp
>             Fix For: 2.15.0
>
>
> Currently, the Aggregation component allows the completion to be triggered on either a Timeout, a set number of aggregations, or via use of a Predicate to determine the completion.   In some cases the AggregationStrategy itself may be the best place to determine if the aggregation is complete.
> One example:  adding a "data size limit" as the trigger.   The aggregation component has no concept of the "size" of the data (nor should it) as it's the AggregationStrategy object that handles the actual aggregation of the data.   If during the Aggregating of the exchanges if a size limit (or other limit) is achieved, it would be good to be able to flag the exchange as ready.
> This can be somewhat done as a predicate that looks at the aggregated exchange and looks at the size.   However, this requires the user to implement two objects and configure two things for the aggregator.  One proposal would be that if the user supplied AggregationStrategy implements Predicate and no completionPredicate is supplied, the given AggregationStrategy is also set as the completionPredicate.   Similarly, a new interface could be introduced for this if using Predicate is a concern.
> Another strategy would be to set a property on the returned exchange during aggregation that would mark it as "done" and have the Aggregator look for that property.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)