Steve, the route looks like this (simplified):
<route id="Fetch.data"> <from uri="timer://1234?repeatCount=-1&fixedRate=true&period=10000" /> <to uri="mybatis:select_messages?statementType=SelectList&executorType=batch" /> <split streaming="true"> <simple>${body}</simple> <setHeader headerName="messageFormatId"> <simple>${headers.currentMessage.messageFormatId}</simple> </setHeader> <aggregate strategyRef="myAggregationStrategy"> <correlationExpression><simple>true</simple></correlationExpression> <setHeader headerName="CamelFileName"> <simple>${headers.fileName}</simple> </setHeader> <to uri="direct:send.message" /> </aggregate> </split> </route> The SQL is like: select * from MESSAGES M where -any condition- order by M.MESSAGE_FORMAT_ID I will always get a list of Messages, ordered by the MFO ID. -- Oliver -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Aggregator-issue-tp5792131p5792145.html Sent from the Camel - Users mailing list archive at Nabble.com.