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: No hit during Multicast
Date Tue, 12 Jun 2012 13:30:10 GMT
On Tue, Jun 12, 2012 at 2:57 PM, kenhans <kenhansa@hotmail.co.uk> wrote:

> thanks, Claus, I'm slowly getting there...
>
> I think my problem might be more fundamental. If I try to put the
> AggregationStrategy into the multicast, I am still not able to get a hold
> of
> the Exchange. All "filter"s turn out false => no .aggregate is reached. How
> do I get a handle on that Exchange after the filter, I wonder?
>
> MulticastDefinition multicastDefinition = route.multicast().onPrepare(new
> DocumentDeepClone());
> for (Producer producer : producers) {
>  multicastDefinition
>  .filter().method(producer, "filter")
>   *.aggregate(header(PostProcessor.HEADER_ID) , new
> MyAggregationStrategy())*
>  .bean(producer, "createEvent")
>  .to(EndPointUri.INCOMING_EVENT_QUEUE);
> }
>
>
Ah dont use the .aggregate EIP, as the multicast have built-in support for
aggregation as well.
Just configure the MyAggregationStrategy on the MulticastDefinition itself.


>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/No-hit-during-Multicast-tp5683138p5714355.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message