简体   繁体   中英

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

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

Hope this is helpful.

Add &readLock=changed option in from uri. It will avoid to download the file which being written. it worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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