camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: help with aggregator exception
Date Thu, 27 Sep 2012 14:30:54 GMT
Hi

> strategyRef="aggregatorStrategy"

You need a bean with that id, that implements the
org.apache.camel.processor.aggregate.AggregationStrategy interface
from Camel.
And in that bean you implement the logic to aggregate the messages together.





On Thu, Sep 27, 2012 at 3:55 PM, realice <realice@gmail.com> wrote:
> Hi, I am trying to learn about aggregator and got an exception with the
> following route, can anyone tell me what's wrong? also is it mandatory to
> have the to uri in the end. if i'm doing inout pattern shouldn't the
> aggregated response go back to the sender automatically?
>
> <route>
>   <from uri="jms:QUEUENAME"/>
>  <aggregate strategyRef="aggregatorStrategy" completionSize="3">
>  <correlationExpression>
>   <header>JMSCorrelationID</header>
>   </correlationExpression>
>   <to uri="mock:result" />
>   </aggregate>
>   </route>
>
>
> Caused by: java.lang.IllegalArgumentException: AggregationStrategy or
> AggregationStrategyRef must be set on Aggregate[JMSCorrelationID ->
> [To[mock:result]]]
>         at
> org.apache.camel.model.AggregateDefinition.createAggregationStrategy(AggregateDefinition.java:279)
>         at
> org.apache.camel.model.AggregateDefinition.createAggregator(AggregateDefinition.java:158)
>         at
> org.apache.camel.model.AggregateDefinition.createProcessor(AggregateDefinition.java:149)
>         at
> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:441)
>         at
> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:179)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:870)
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/help-with-aggregator-exception-tp5720128.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message