Camel not recognizing ?lock=false as valid(骆驼不承认 ?lock=false 是有效的)
问题描述
我从文件中读取了骆驼路线,并且在路线完成后它没有删除 .CamelLock 文件,所以我想关闭锁定.Camel-File 的文档说该属性是锁定",但是当我执行 <from uri="file:///data/in/?lock=false"/>
我得到:
I've got a camel route reading from a file and it's not deleting the .CamelLock file after the route finishes so I wanted to turn lock off. The documentation for Camel-File says that the attribute is "lock" yet when I do <from uri="file:///data/in/?lock=false" />
I get:
原因:org.apache.camel.ResolveEndpointFailedException: 失败解决端点:file:///data/in/?lock=false 由于:未能解决端点:file:///data/in/?lock=false 由于:有 1无法在端点上设置的参数.检查uri,如果参数拼写正确并且它们是端点.未知参数=[{lock=false}]
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: file:///data/in/?lock=false due to: Failed to resolve endpoint: file:///data/in/?lock=false due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{lock=false}]
骆驼 2.11.0
推荐答案
Camel 2.x 的文件组件文档在这里:http://camel.apache.org/file2您很可能在以下位置阅读旧的 Camel 1.x 文档:http://camel.apache.org/file注意页面顶部,它说这是针对 Camel 1.x 的!
The file component documentation for Camel 2.x is here: http://camel.apache.org/file2 You most likely read the old Camel 1.x documentation at: http://camel.apache.org/file Notice on the top of the page, it says this is for Camel 1.x!
有一个 readLock 选项,默认情况下使用 markerFile (以及为什么你会看到那些 .camelLock 文件).您可以通过将 readLock 选项设置为 none 来关闭它,例如
There is a readLock option which by default uses markerFile (and hence why you see those .camelLock files). You can turn this off by setting the readLock option to none, eg
readLock=none
这篇关于骆驼不承认 ?lock=false 是有效的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:骆驼不承认 ?lock=false 是有效的


- Jersey REST 客户端:发布多部分数据 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01