Apache Camel File监视create事件能否确保文件完整性

4zcjmb1e  于 2022-11-07  发布在  Apache
关注(0)|答案(1)|浏览(281)

文件监视器组件是否内置文件完整性检查?这是否确保文件完全形成。例如,文件监视器的事件支持监视目录和中的文件创建。此文件可能正在创建/写入,但尚未完全完成。文件监视器是否在其警报/传播文件创建事件之前监视文件是否完全形成..以便在获取文件时,它不是部分,而是完全形成的。如果不是,我们可以配置为验证.file状态:不处于 transient (正在更新)WIP状态,但100% b.可能的文件完整性与算法,保证文件传输,而不被篡改之间的当前目录和原始文件,如校验和等

2vuwiymt

2vuwiymt1#

请参见文件组件的'readLock'属性:

Changed is using file length/modification timestamp to detect whether the file is currently being copied or not. Will at least use 1 sec to determine this, so this option cannot consume files as fast as the others, but can be more reliable as the JDK IO API cannot always determine whether a file is currently being used by another process. The option readLockCheckInterval can be used to set the check frequency.

相关问题