Spring sftp:inbound-channel-adapter问题

时间:2019-06-21 13:54:03

标签: spring

我在Spring上下文文件中配置了sftp:inbound-channel-adapter和poller。对于轮询器,我设置了固定速率以从配置文件中读取值-这种方法与应用程序中的所有其他bean都可以正常使用。但是,在运行时,轮询器将忽略固定值速率,而是以每10秒一次的速率轮询,而不是所需的5分钟。其他人是否遇到过这个问题,或者是否对他们的应用程序采用了相同的方法,但比我获得了更大的成功?

下面的代码段-

Spring bean上下文文件:

`<int-sftp:inbound-channel-adapter
        id="sftpAdapterAutoCreate"
        session-factory="sftpSessionFactory"
        channel="inboundChannel"
        remote-directory="${telematics.file.remote.sftp.directory.path}"
        preserve-timestamp="true"
        local-directory="file:${telematics.file.input.directory.path}"
        auto-create-local-directory="true"
        delete-remote-files="true"
        filename-regex="${sftp.file.name.regex:\S*\.(json|JSON|7z|7Z|zip|ZIP)}">

        <int:poller max-messages-per-poll="1" fixed-rate="${telematics.file.remote.sftp.directory.poll.rate.millis}"/>

    </int-sftp:inbound-channel-adapter>`

配置文件键:值对:

telematics.file.remote.sftp.directory.poll.rate.millis = 300000

在此先感谢您的帮助,

安格斯

0 个答案:

没有答案