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 是有效的
基础教程推荐
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
