Hi Either tweak the read lock change options to have higher threshold - see the docs. Or when you copy the file to that computer, then copy it to some other directory / or use some other kind of name. And then afterwards move / rename the file - as this would then do it on the same computer/file-system and allow it to be a fast atomic operation. And allow Camel to only start process the file when its fully moved/renamed. Or dont let Camel run that route at this time, and then start the route afterwards you are done copy the file.
On Mon, Nov 13, 2017 at 12:17 PM, Shashank Gupta <shashank.gu...@talentica.com> wrote: > Hi, > > We am trying to unzip the zip and then reading the pdf and txt files inside > that. We are using Camel Apache with Java in our project. > The problem is occurring when we are trying to copy the zip over remote > desktop in windows, we are copying the zip directly into the hot folder(which > camel is listening ). > Camel starts unzipping and reading the files even before windows completed > copying the zip fully. > So sometimes we get "unexpected end of zlib input stream" error and sometimes > "java.util.zip.ZipException: invalid stored block lengths". > Zip contains pdf files and associated txt file with each pdf, so sometimes > pdf gets unzipped but txt file is still in the process of unzipping and camel > starts reading the pdf file so sometimes we get error because of this. > > We tried using :- > > 1. readLock - changed :- It didn't work because we are not sure about > the length and modification time of the zip. > > 2. readLock - rename:- It didn't worked out too. > > Can anyone please help us on this issue. > > > Regards > Shashank Gupta > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2