Hi,

I think that the wiki page of camel aggregator is not up to date.

For camel 2.x, the following syntax is not longer correct :

// our route is aggregating from the direct queue and sending the
response to the mock
from("direct:start")
    // aggregated by header id and use our own strategy how to aggregate
    .aggregate(new MyAggregationStrategy()).header("id")
    // wait for 0.5 seconds to aggregate
    .batchTimeout(500L)
    .to("mock:result");


--> but should be

// our route is aggregating from the direct queue and sending the
response to the mock
from("direct:start")
    // aggregated by header id and use our own strategy how to aggregate
    .aggregate(new MyAggregationStrategy()).header("id")
    // wait for 0.5 seconds to aggregate
    .completionTimeout(500L)
    .to("mock:result");

Remark : completionTimeout is not defined in the batch option

KR,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel/ServiceMix Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Reply via email to