325.6. StreamList 사용
제작자가 iterator를 사용하여 쿼리 출력을 스트리밍하는 outputType=StreamList를 지원합니다. 이를 통해 Splitter EIP에서 데이터를 스트리밍 방식으로 처리하여 한 번에 하나씩 각 행을 처리하고 필요에 따라 데이터베이스에서 데이터를 로드할 수 있습니다.
from("direct:withSplitModel")
.to("sql:select * from projects order by id?outputType=StreamList&outputClass=org.apache.camel.component.sql.ProjectModel")
.to("log:stream")
.split(body()).streaming()
.to("log:row")
.to("mock:result")
.end();