camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Gdula <camelnab...@xdjk.org>
Subject Re: AW: Aggregator - complete when newExchange.header('"x") != oldExchange.header("x)
Date Fri, 07 Mar 2014 13:11:28 GMT

What i want is to group subsequent messages. If there is a message that
doesn't fit to messages i've already aggregated then i want to stop
aggregation and start to aggregate from that message.
Im my case correlation correlationExpression in my case must be
'constant(true)'.

I want to process files (that satisfy a certain criteria) in batches but I
don't want to change their order because that is not acceptable in my case. 

eg. The input is 

A,A,A,A,B,C,A,B,B,D,B,A

having aggregator setup to aggregate max 5 messages, and some timeout i
wan't it to group message like this

1. *(A,A,A,A)*,(B),(C),(A),(B,B),(D),(B),(A)
or this
2. *(A,A),(A,A)*,(B),(C),(A),(B,B),(D),(B),(A)

if i'd use correlationExpression on the content then i'd probably get 

3. (A,A,A,A,A),(B,B,B,B),(C),(D),(A)

while 1 and 2 is ok, 3 is not acceptable because the messages are not in
original sequence.
 



--
View this message in context: http://camel.465427.n5.nabble.com/Aggregator-complete-when-newExchange-header-x-oldExchange-header-x-tp5748442p5748451.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message