【问题标题】:I get the exception "Apache Camel Cannot acquire lock within xxx millis. Will skip the file"我收到异常“Apache Camel 无法在 xxx 毫秒内获取锁。将跳过该文件”
【发布时间】:2021-04-06 08:47:25
【问题描述】:

我在使用 FileZilla 将 0-KB .csv 文件上传到我的 FTP 服务器时收到了执行命令。我正在使用 Apache Camel 来路由文件并对其进行处理。

但这样做时,我收到警告“Apache Camel 无法在 xxx 毫秒内获取锁定。将跳过该文件”。

org.apache.camel.component.file.remote.strategy.SftpChangedExclusiveReadLockStrategy Cannot acquire read lock within 20000 millis. Will skip the file: RemoteFile[filename.csv]

因此,该文件没有被路由到我的应用程序,我无法处理该文件。

【问题讨论】:

    标签: java spring-boot apache-camel filezilla


    【解决方案1】:

    一个0字节的空文件被认为是一个正在更新的文件。但是,在 FTP 组件上有一个选项,您可以将阈值设置为 0 字节以供使用。请参阅 FTP 文档中的选项 readLockMinLength:https://camel.apache.org/components/latest/ftp-component.html

    【讨论】:

      猜你喜欢
      • 2017-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-17
      相关资源
      最近更新 更多