4
我正在使用彈簧集成的入站通道適配器。我想要在兩個不同的目錄下進行輪詢 - 一個文件類別 - 並解析位於那裏的文件。我使用的代碼是:使用相同通道的彈簧集成的多個入站通道適配器
<int:channel id="inputChannel"/>
<file:inbound-channel-adapter id="fileInOne"
directory="myDirOne"
auto-create-directory="true"
channel = "inputChannel">
<int:poller id="one" cron="1/10 * * * * *"/>
</file:inbound-channel-adapter>
<file:inbound-channel-adapter id="fileInTwo"
directory="myDirTwo"
auto-create-directory="true"
channel = "inputChannel">
<int:poller id="two" cron="1/10 * * * * *"/>
</file:inbound-channel-adapter>
兩個入站通道適配器使用相同的通道。所以我想知道從哪個入站通道適配器加載文件。
謝謝你的回答!我會嘗試。我想問別的。這種配置會影響效率嗎?對每個入站通道適配器最好使用不同的通道? – pbal 2013-02-19 09:13:50