I think that you are going to need to split the body in such a way that it
splits the records that are returned, and I don't think that using the
simple expression of "body" is going to do that for you.  Furthermore,
using streaming will just split the body into arbitrarily sized chunks,
which won't give you the splitting that you are expecting.  Someone can
feel free to correct me if I am wrong, of course.  Could you put a log
statement in before the "split" step, and show me what the returned body
looks like?  Then I can help you split the body properly.

On Wed, Jan 4, 2017 at 9:30 AM, okieven <oliver.kie...@nttdata.com> wrote:

> Steve,
>
> the route looks like this (simplified):
>
> <route id="Fetch.data">
>     <from
> uri="timer://1234?repeatCount=-1&amp;fixedRate=true&amp;period=10000" />
>     <to
> uri="mybatis:select_messages?statementType=SelectList&amp;
> 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.
>

Reply via email to