【发布时间】:2014-12-07 02:55:24
【问题描述】:
目前我有一个基本的 FTP 入站通道适配器,配置了轮询器
<int-ftp:inbound-channel-adapter id="ftpInboundChannelAdapter">
<int:poller cron="#{fooProperties['foo.ftp.cron']}" max-messages-per-poll="-1" />
</int-ftp:inbound-channel-adapter>
cron 每天在特定时间执行一次。
但是,有时我们连接的 FTP 服务器会抛出错误,例如
org.apache.commons.net.ftp.FTPConnectionClosedException: FTP response 421 received. Server closed connection.
在这种情况下,我们希望“重新轮询”,可配置的次数。
我读到了int:request-handler-advice-chain,但看起来你不能在 FTP 适配器的轮询器上使用它。
我使用的是 SI 2.2.6,但如果需要可以升级
【问题讨论】:
标签: java spring spring-integration