camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kenhans <kenha...@hotmail.co.uk>
Subject Re: No hit during Multicast
Date Wed, 13 Jun 2012 11:15:12 GMT
this is turning into a farce and I might end up being the stupidest kid on
earth :-)

Anyway, when aggregating, I do not seem to be able to fetch relevant data
from neither the oldExchange nor the newExchange. I am not able to see any
Exchange.TO_ENPOINT, and all headers I set within the bean or filter are not
visible when doing aggregation. It seems like the local copies of the
exchange which are multicasted, loose their values before aggregation. The
only way I was able to preserv anything, was to set the properties directly
on the CamelContext of the Exchange
exchange.getContext().getProperties().put("foo", "bar");
Then I am able to access that property when doing the aggregation as defined
below. However, this seems to be a bit dirty as I need to remove the
property after using it etc.

MulticastDefinition multicastDefinition = route.multicast(); 
for (Producer producer : producers) { 
  multicastDefinition 
  .filter().method(producer, "filter")   
  .bean(producer, "createEvent") 
  .to(EndPointUri.INCOMING_EVENT_QUEUE); 
} 
multicastDefinition.aggregate(constant(true) , new
MyAggregationStrategy()).completionTimeout(3000).to("log:dummy");

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

Mime
View raw message