camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: How can I split resultset that come from database?
Date Fri, 02 Dec 2011 10:47:07 GMT
On Fri, Dec 2, 2011 at 11:36 AM, Christian Müller
<> wrote:
> Use "split(body())".

Yes this will work if the message body is Iterateable, such as a
Collection, Array, List etc.

However if the body is a pure javax.sql.ResultSet then that API is not

You could add a custom type converter from ResultSet -> Iterator
And then implement the logic there, and also implement the Closeable
interface, and close the resultset on the close() method.
The Camel splitter supports the Closeable interface.

> Best,
> Christian
> On Fri, Dec 2, 2011 at 11:02 AM, focaldi <> wrote:
>> Hi, I am trying to split a resultset. My Route runs a select sql in
>> database
>> after that it will send all resultset in a message. But I need to split the
>> resultset and send to queue row by row. Ho can I do this? Thanks all
>> --
>> View this message in context:
>> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message