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 58D8211CD7 for ; Fri, 4 Jul 2014 13:02:34 +0000 (UTC) Received: (qmail 72634 invoked by uid 500); 4 Jul 2014 13:02:34 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 72591 invoked by uid 500); 4 Jul 2014 13:02:33 -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 72581 invoked by uid 99); 4 Jul 2014 13:02:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jul 2014 13:02:33 +0000 Date: Fri, 4 Jul 2014 13:02:33 +0000 (UTC) From: "Peter Keller (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-7555) ZipAggregationStrategy does not preserve properties MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-7555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14052424#comment-14052424 ] Peter Keller commented on CAMEL-7555: ------------------------------------- It's expected that properties are accessible during the *entire* lifetime of the {{Exchange}} object. From the JavaDoc of [Exchange|http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html]: {quote} The Exchange also holds meta-data during its *entire* lifetime stored as properties accessible using the various getProperty(String) methods. {quote} Why not copy just all properties as this is be done everywhere else? > ZipAggregationStrategy does not preserve properties > --------------------------------------------------- > > Key: CAMEL-7555 > URL: https://issues.apache.org/jira/browse/CAMEL-7555 > Project: Camel > Issue Type: Bug > Affects Versions: 2.13.1 > Reporter: Peter Keller > Assignee: Willem Jiang > > {{ZipAggregationStrategy}} does not preserve properties: > {code} > public class MyRouteBuilder extends RouteBuilder { > @Override > public void configure() { > from("file:zipper/in?include=.*.xml&noop=true") > .process(new Processor() { > @Override > public void process(final Exchange exchange) throws Exception { > exchange.setProperty("myProperty", "myValue"); > } > }) > .aggregate(new ZipAggregationStrategy()) > .constant(true) > .completionFromBatchConsumer() > .eagerCheckCompletion() > .log("myProperty = ${property.myProperty}") > .to("file:zipper/out"); > } > } > {code} > This logs: > {quote} > myProperty = > {quote} > Instead it should log: > {quote} > myProperty = myValue > {quote} > See http://stackoverflow.com/questions/24473035/how-to-access-calling-exchange-with-camels-zipaggregationstrategy -- This message was sent by Atlassian JIRA (v6.2#6252)