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