简体   繁体   English

Apache camel如何在路由上的FTP组件上应用readLock

[英]Apache camel how to apply readLock on FTP component from route

Am having an FTP route from where i will be downloading files i want to apply readLock on it, so when something is being written on that file, i will not download it in the middle, i read about it in file component, but iam not clear on how to apply this option on my FTP route, Please help below is the sample code of my route 我有一个FTP路由,我将下载文件,我想在其上应用readLock,所以当在该文件上写入某些内容时,我不会在中间下载它,我在文件组件中读到它,但是我没有明确如何在我的FTP路由上应用此选项,请在下面帮助我的路线示例代码

from(" ftp://localhost:21/export?username=user&password=123&idempotent=true ") .to("file:tmp/inbound") from(“ ftp:// localhost:21 / export?username = user&password = 123&idempotent = true ”)。to(“file:tmp / inbound”)

please have a look at the below link here they mentioned what options are there and what each option strategy does 请看下面的链接,他们提到了哪些选项以及每个选项策略的作用

https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/EIP_Component_Reference/files/_IDU_File2.html https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/EIP_Component_Reference/files/_IDU_File2.html

Hope this is helpful. 希望这是有帮助的。

Add &readLock=changed option in from uri. 从uri添加&readLock =已更改选项。 It will avoid to download the file which being written. 它将避免下载正在写入的文件。 it worked for me. 它对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM