camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastien Petrucci (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-7433) Please create a preCompletionPredicate for camel aggregator
Date Thu, 14 Aug 2014 07:50:12 GMT

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

Sebastien Petrucci commented on CAMEL-7433:
-------------------------------------------

Hello Claus,
The issue with 'eagerCheckCompletion' is that the incoming exchange will still be added to
the current aggregate. The intent here is to have a way to say "the incoming exchange will
not fit, please flush the current aggregate and start a new one".
Should you require more details about the use case, please just let me know.
Regards.

> Please create a preCompletionPredicate for camel aggregator
> -----------------------------------------------------------
>
>                 Key: CAMEL-7433
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7433
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core, eip
>    Affects Versions: 2.10.7
>            Reporter: Susan Javurek
>             Fix For: Future
>
>
> We often face the same issue when it comes to aggregating multiple records into a single
file.
> A very common requirement that we have is that the aggregated files that we produce must
not be bigger than a certain size (for example, 10MB). Relying on a predefined maximum of
records or doing the size check after the aggregation is not option.
> So ideally, before an exchange (holding a single file record) gets aggregated by a Camel
aggregator, we should have a way to verify that the new exchange will fit into the current
aggregate. If not, the current aggregate should be completed. And only after that, the new
exchange could be aggregated.
> This could be easily achieved if Camel's aggregator would have a new optional attribute
'preCompletionPredicate'. This predicate could be have an interface/signature as follows:
> boolean preComplete(Exchange aggregate, Exchange newExchange);
> The predicate implementation would then be able to use information from both exchanges
to know if the aggregate should be completed before aggregating the new exchange or not.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message