...
Using the Spring XML Extensions
Info | ||
---|---|---|
The correlationExpression element is in Camel 2.0. For earliler versions of Camel you will need to specify your expression without the enclosing correlationExpression element.
|
The following example shows how to create a simple aggregator using the XML notation; using an Expression for the correlation value used to aggregate messages together.
...
Wiki Markup |
---|
{snippet:id=e2|lang=java|url=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomAggregationCollectionTest.java} |
Custom aggregation collection in Spring DSL
You can also specify a custom aggregation collection in the Spring DSL. Here is an example for Camel 2.0
Wiki Markup |
---|
{snippet:id=example|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/aggregator-custom-collection.xml} |
In Camel 1.5.1 you will need to specify the aggregator as
Code Block |
---|
<aggregator batchTimeout="500" collectionRef="aggregatorCollection">
<expression/>
<to uri="mock:result"/>
</aggregator>
|
Include Page | ||||
---|---|---|---|---|
|
...