Hi Claus,

Thanks for the reply.

Yes, I am able to modify the script. But if we do copy the file with
temporary name and then rename, I doubt that there may be lock acquired on
temporary file name already. because my route has no waiting parameter. So
I think it might not be helpful for our case. Please correct me if I am
wrong.

Regarding the file lock strategies, I think  readLock think
readLockCheckInterval think can be tried. Do you have any other suggestion?

FYI : Whatever I can try I need to try on Production server so just wanted
to tackle this with minimum and required trials.

Thanks!


On Mon, Aug 6, 2018 at 7:10 PM, Claus Ibsen <claus.ib...@gmail.com> wrote:

> Hi
>
> Are you able to modify the VB script so it copies the file using a
> temporary name and then rename the file when the copy is done.
>
> It sounds a bit like the problem is that the VB script is currently
> still copying the file, while Camel gets a lock on the file, and
> attempt to process it.
> File locks is not as easy and it depends a bit what file system, OS,
> and how big the files are and other things.
>
> A good strategy is to copy the files using temporary names or in
> another folder, and then do a file rename when the copy is over, that
> latter then is an atomic file operation which should not cause file
> locking issues.
>
> You can also try to use some of the other Camel file lock strategies
> instead of marker files.
> You can see more in the file documentation about these.
>
>
> On Mon, Aug 6, 2018 at 3:19 PM, Hemant Pekhale <hemant.pekh...@gmail.com>
> wrote:
> > Hi All,
> >
> > I have a route which picks files from a folder and do some processing on
> it
> > and store it in other folder. I have used parameter "delete=true" for
> > deleting file from source folder.
> >
> > Sometime it happens that files are stuck in the source folder and camel
> > lock files are also created for all the files but files are neither
> process
> > nor gets deleted.
> >
> > There is a VB script which copied files in the source folder. When I
> > manually copied the files in the source folder then it never gives issue
> > but when the files are copied from VB script then only issue occurs. Also
> > the issue does not occur for the first file but it occurs randomly after
> > processing number of files.
> >
> > This happens on server. I tried to reproduce this issue locally but no
> luck.
> >
> > Does anybody have idea about it?
> >
> > Thanks!
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Reply via email to