I am trying to use camel-sql component with the option of useIterator=true
but the result still gets loaded in one single big list. I have 2 million records to be processed and getting the resultset in one list is not an option. Below is the route configuration:
<route id="sql_route">
<from uri="activemq:MW_SQL"/>
<to uri="sql:SELECT ID, MSGID_PROD FROM amq.activemq_msgs?useIterator=true"/>
<log message="This data is = ${body}"/>
</route>
From sourcecode it is clear that camel takes the whole resultset in list and then creates iterator of the same. Wrong design.