camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yazan <>
Subject JDBC component handling large results
Date Mon, 08 Apr 2013 14:27:31 GMT
The JDBC component currently reads all the rows returned by a query in one
shot, this only works for small resultsets. I'm trying to modify the
component to support cursor semantics, so it reads only X numbers of rows,
sets the rows in a new exchange's body and forwards it, rinse repeat until
all the rows returned from a query are processed. The JDBC component only
create a producer that executes a sql statement it received in a body of  an
exchange. My question is about the best approach to do this "1 exchange" to
a "series of exchanges" mapping, My research lead me to MulticastProcessor
it seems that I should make JDBCProducer extend it and then override
createProcessorExchangePairs to create an Iterable<ProcessorExchangePair>
that actually reads rows from the resultset to populate each new exchange,
Am I on the right track here?

View this message in context:
Sent from the Camel Development mailing list archive at

View raw message