Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4555B183DB for ; Sun, 12 Jul 2015 11:56:10 +0000 (UTC) Received: (qmail 34099 invoked by uid 500); 12 Jul 2015 11:56:05 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 33798 invoked by uid 500); 12 Jul 2015 11:56:05 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 33787 invoked by uid 99); 12 Jul 2015 11:56:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jul 2015 11:56:05 +0000 Date: Sun, 12 Jul 2015 11:56:05 +0000 (UTC) From: "Andy Fedotov (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CAMEL-8955) Processor for .pollEnrich incorrectly handles provided AggregationStrategy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Andy Fedotov created CAMEL-8955: ----------------------------------- Summary: Processor for .pollEnrich incorrectly handles provided AggregationStrategy Key: CAMEL-8955 URL: https://issues.apache.org/jira/browse/CAMEL-8955 Project: Camel Issue Type: Bug Components: camel-core Affects Versions: 2.14.3 Reporter: Andy Fedotov Priority: Minor As it can be concluded from AggregationStrategy javadoc, and also from available implementations such as GroupedExchangeAggregationStrategy, it should be used in the following manner: {code:java} AggregationStrategy strategy = new GroupedExchangeAggregationStrategy(); Exchange result = null; result = strategy.aggregate(result, exchange1); result = strategy.aggregate(result, exchange2); // ... and so on return result; {code} But PollEnricher do it in following manner: {code:java} AggregationStrategy strategy = new GroupedExchangeAggregationStrategy(); Exchange result = strategy.aggregate(exchange1, exchange2); return result; {code} This leads to incorrect result returned after aggregation and lost exchanges. Also PollEnricher doesn't handle CompletionAwareAggregationStrategy and does not call onCompletion(). Consequently GroupedExchangeAggregationStrategy does not return aggregated result in the Exchange body. -- This message was sent by Atlassian JIRA (v6.3.4#6332)