[
https://issues.apache.org/jira/browse/CAMEL-7555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Willem Jiang resolved CAMEL-7555.
---------------------------------
Resolution: Won't Fix
Camel doesn't suppose to copy the properties in default aggregator, as it is
hard to tell which property need to be copy if the exchanges use different
properties. If you want to set the FILE_NAME, you can just put the custom
process jut before the setHeader DSL.
> 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)