我有一个骆驼路线,该路线会接收一个大型xml文件,将其拆分,然后将其发送到另一个端点进行处理。
from("file:data/in?readLock=markerFile")
.log("File has been picked and sent to Split")
.to("log:INFO?showHeaders=true&showProperties=true&multiline=true")
.split(body().tokenizeXML("doc","response")).streaming()
.to("seda:fromSplit?size=70000")
.end()
.log("File has been completely split.");
在该路线中,我设置了一条日志,内容为“文件已被完全拆分”。整个文件分割后。但是,此日志本身是写在开头的,并不等待整个拆分完成。为什么会这样?
答案 0 :(得分:0)
您尝试使用parallelProcessing选项吗?