Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12589

Surviving Header AGGREGATION_COMPLETE_ALL_GROUPS_INCLUSIVE affects following aggregations

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.21.0, 2.21.1
    • Fix Version/s: 2.21.2, 2.22.1, 2.23.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      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:

      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();
              }
      ...
      
      

      this consideration is made by analysing similar behavior and lifecycle of header AGGREGATION_COMPLETE_ALL_GROUPS:

      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();
              }
      ...
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              grigoni Gianandrea Rigoni
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: