我在camel中配置了一个简单的NOOP文件使用者,如下所示:
file:///tst?delay=10000&idempotent=false&include=fileMatch&noop=true
通常,运行camel应用程序的用户没有/tst的写入权限,但是有/tst/fileMatch的读写权限。不幸的是,我发现 Camel 甚至不会轮询该文件,除非它具有/tst 的写入权限。
有办法解决这个问题吗?
最佳答案
自上次回答以来,camel 文件组件发生了相关更改:
Notice from Camel 2.10 onwards the read locks changed, fileLock and rename will also use a markerFile as well, to ensure not picking up files that may be in process by another Camel consumer running on another node (eg cluster). This is only supported by the file component (not the ftp component).
因此,在Camel 2.10或更高版本中,您仍然需要写权限才能使用readLock=fileLock。可以使用readLock=none
,明显的效果是不会出现读锁。
关于java - Apache Camel 文件队列需要 NOOP Consumer 的目录写入权限吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6352890/