On Tue, Oct 30, 2012 at 2:59 AM, gtesta13 <gtest...@gmail.com> wrote: > Hi, > I have a route that looks like this: > > from("cxf:bean:personasEndpoint").to("ReqPreProcessor").to("seda:a?multipleConsumers=true"); > from("seda:a").to("CXFProcessor1").to("cxf:bean:Consulta1Service").to("direct:b"); > from("seda:a").to("CXFProcessor2").to("jdbc:pgDS").to("direct:b"); > from("direct:b").aggregate(header("idReq"), new AggregationStrategyPersona() > ).completionSize(2); > > I tried to do is to collect the bodies of the messages in one. > In the RePreProcessor I do this: > > exchange.getOut().setHeaders(exchange.getIn().getHeaders()); > exchange.getOut().setHeader("idReq", "1"); > exchange.getOut().setBody(exchange.getIn().getBody()); > > I did this to try to use the agregattor....Is this right? And also giving me > the following error: > > org.apache.camel.FailedToCreateRouteException: Failed to create route route4 > at: >>> Aggregate[header{idReq} -> []] <<< in route: Route[[From[direct:b]] > -> [Aggregate[header{idReq} -> []]]] because of Definition has no children > on Aggregate[header{idReq} -> []] > > Can anyone help me with this? >
You need to add some output to the aggregator that routes the aggregated messages when they are complete. For example to route to another route you can do: from("direct:b") .aggregate(header("idReq"), new AggregationStrategyPersona()).completionSize(2) .to("direct:aggregatedMessagesGoesHere"); > Thanks > > Gaston > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Problem-With-Camel-Aggregator-tp5721756.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: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen