java - Apache Camel 文件队列需要 NOOP Consumer 的目录写入权限吗?

标签 java apache-camel

我在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/

相关文章:

ftp - Apache Camel FTP - 上下文启动和停止之间的最佳实践是什么

java - 总可用内存java

java - Dynamodb 如何在项目中的列表元素中执行更新?

java - isAnonymous() 和 isAuthenticated() 在错误页面上都返回 false

java - hprof结果中 `accum`字段的含义是什么?

java - 将消息写入 Camel 中的文件?

java - android 以编程方式更改imageview

java - 在 Spring 应用程序中添加 Apache Camel 自定义组件/端点

java - 是否可以使用camel循环遍历文本文件来创建路线?

apache-camel - 如何为不同的外部服务/应用程序设计/开发集成层或总线