I have a route that moves files to the destination directory. The route works this way - it does preMove to the processing folder, and when all is okay, it moves the file to the .done directory.
If the route fails, I have a list of all files that should have been moved to the .done folder, but the Camel file route is slow in writing them. I am getting in the situation when the Camel file route is still writing files to a directory while I am moving it to another folder in another route in the processor.
What is the most Camel way to fix it?
I know files. I know directories files will be eventually written to.
UPDATE 1: I have in my first file route these params:
readLock=idempotent-changed&readLockMinAge=3s
The question is, should I wait for 3s to make route trigger and then move files?
From this section
doneFileName
optionWrite a marker file in the producer route and read data file in consumer route when related marker file exist.