You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Chris Pimlott (JIRA)" <ji...@apache.org> on 2015/01/15 01:49:34 UTC

[jira] [Created] (CAMEL-8246) ZipAggregationStrategy

Chris Pimlott created CAMEL-8246:
------------------------------------

             Summary: ZipAggregationStrategy
                 Key: CAMEL-8246
                 URL: https://issues.apache.org/jira/browse/CAMEL-8246
             Project: Camel
          Issue Type: Bug
    Affects Versions: 2.14.0
            Reporter: Chris Pimlott


ZipAggregationStrategy does not preserve any headers from the aggregated exchanges.  This makes it difficult to do something like name the output zip file based on the correlation key:

```
    <from uri="direct:input"/>
    <aggregate strategyRef="zipStrategy" eagerCheckCompletion="true">
      <correlationExpression>
        <simple>${header[batchId]}</simple>
      </correlationExpression>
      <completionSize>
        <simple>${header[batchSize]}</simple>
      </completionSize>
      <setHeader headerName="CamelFileName">
        <simple>batch-${header[batchId]}.zip</simple>
      </setHeader>
      <to uri="direct:output"/>
    </aggregate>
```

This behavior is inconsistent with other existing AggregationStrategies, including AggregationStrategyBeanAdapter, FlexibleAggregationStrategy, UseLatestAggregationStrategy, and UseOriginalAggregationStrategy, which all use a complete copy of the first exchange received when initializing the aggregated exchange.

 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)