骆驼不承认 ?lock=false 是有效的 [英] Camel not recognizing ?lock=false as valid

查看:27
本文介绍了骆驼不承认 ?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 是有效的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆