Hi Then you can implement your custom read lock strategy where you can use any java code to do whatever you want.
On Wed, Dec 11, 2013 at 6:14 PM, Martín Steffen <mstef...@3cinteractive.com> wrote: > Hi, > Thanks for your answer. > But, in your scenario, a file that is uploaded needs to wait 5 minutes to > be taked by Camel? If NOT exists network issues, the file takes 5 minutes > to be taked by Camel? > This is unacceptable for me. > > Thanks, > Martin. > > On 12/11/13 2:08 PM, "kraythe ." <kray...@gmail.com> wrote: > >>try: >> >>from("file:/mypath?include=.*\\.xlsx&readLock=changed&delay=" + >>this.config >>.fileReadDelay()+ "&moveFailed=Errors&move=Processed") >> >>This sets up a locking strategey delay that will fail to get the read lock >>if the file has been changed within fileReadDelay() milliseconds. When the >>file is streaming in upload it will not get the upload because the size is >>changing, then it will wait for the next delay interval to try again. We >>have ours set to 5 min and that handles all possible situation. >> >> >> >>*Robert Simmons Jr. MSc. - Lead Java Architect @ EA* >>*Author of: Hardcore Java (2003) and Maintainable Java (2012)* >>*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 >><http://www.linkedin.com/pub/robert-simmons/40/852/a39>* >> >> >>On Wed, Dec 11, 2013 at 6:56 AM, Martín Steffen >><mstef...@3cinteractive.com>wrote: >> >>> Hello, >>> >>> I have a problem with the "change" readLock strategy when I send a file >>> through FTP, >>> When I send a file through FTP and occur network issues (package delay, >>> lost, etc), then Camel takes an incomplete file due to expiration of >>> readLockCheckInterval. >>> >>> Are you evaluated the option of use the ¨lsof¨ command (or a similar >>>tool >>> that tells if a file is open) as an alternative to >>>readLockCheckInterval? >>> >>> Thanks, >>> Martin. >>> > -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io