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

[jira] [Updated] (CAMEL-12589) Surviving Header AGGREGATION_COMPLETE_ALL_GROUPS_INCLUSIVE affects following aggregations

     [ https://issues.apache.org/jira/browse/CAMEL-12589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gianandrea Rigoni updated CAMEL-12589:
--------------------------------------
    Priority: Major  (was: Minor)

> Surviving Header AGGREGATION_COMPLETE_ALL_GROUPS_INCLUSIVE affects following aggregations
> -----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-12589
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12589
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.21.0, 2.21.1
>            Reporter:  Gianandrea Rigoni
>            Priority: Major
>
> When AGGREGATION_COMPLETE_ALL_GROUPS_INCLUSIVE is once set true it survives current aggregation processing and affects in unexpected way following aggregation by triggering "forceCompletionOfAllGroups()" again
> in next code snippet might be needed some additional handling when the header is true:
> {code:java}
> protected void doProcess(Exchange exchange) throws Exception {
> ...
>         // check for the special header to force completion of all groups (inclusive of the message)
>         boolean completeAllGroupsInclusive = exchange.getIn().getHeader(Exchange.AGGREGATION_COMPLETE_ALL_GROUPS_INCLUSIVE, false, boolean.class);
>         if (completeAllGroupsInclusive) {
>             forceCompletionOfAllGroups();
>         }
> ...
> {code}
> this consideration is made by analysing similar behavior and lifecycle of header AGGREGATION_COMPLETE_ALL_GROUPS:
> {code:java}
> private List<Exchange> doAggregation(String key, Exchange newExchange) throws CamelExchangeException {
> ...
> ...        
>         // check for the special exchange property to force completion of all groups
>         boolean completeAllGroups = answer.getProperty(Exchange.AGGREGATION_COMPLETE_ALL_GROUPS, false, boolean.class);
>         if (completeAllGroups) {
>             // remove the exchange property so we do not complete again
>             answer.removeProperty(Exchange.AGGREGATION_COMPLETE_ALL_GROUPS);
>             forceCompletionOfAllGroups();
>         } else if (isCompletionOnNewCorrelationGroup() && originalExchange == null) {
>             // its a new group so force complete of all existing groups
>             forceCompletionOfAllGroups();
>         }
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)