zip ファイルのディレクトリを監視し、Camel と Spring DSL を使用して zip ファイル内のファイルを個別に処理したいと考えています。次のようなことは可能ですか?
<camel:route>
<camel:from uri="file:/src/Path/"/>
<camel:split streaming="true">
<zipSplit/>
<camel:to uri="bean:fileProcessor?method=processStream"/>
</camel:split>
</camel:route>
わかりましたので、次は1つのファイルを含むzipファイルに対して機能することがわかりましたが、問題は、複数のファイルを含むzipファイルをどのように処理できるかです?
<bean id="zipFileDataFormat" class="org.apache.camel.dataformat.zipfile.ZipFileDataFormat"/>
<camel:camelContext>
<camel:contextScan/>
<camel:route>
<camel:from uri="file:///C:/testSrc/?delay=6000&noop=true&idempotent=false"/>
<camel:unmarshal ref="zipFileDataFormat"/>
<camel:to uri="file:///C:/testDst"/>
</camel:route>
</camel:camelContext>
ファイルは、別のディレクトリに解凍されたばかりの処理のために Bean に送信されていないことに注意してください。