Question

I have two camel applications and their duty is to read files from the same directory, process them and send them to db consumer. To do this, my endpoint are like this:

file:/data/air?preMove=thread&readLock=fileLock &idempotent=true&idempotentRepository=#fileStore&include=AIROUTPUTCDR_(.*).AIR.gz&move=/data/air/success&moveFailed=error

As u can see, application polls file from polldir based on filters, move them under thread dir to read, read the file and move to success folder.

But with this flow, if I kill an application and start it again, the files ,which were being processed, will not be processed because they are under threads folder.

My question is, is there a way to resume reading the files which are just interrupted?

Thanks

Was it helpful?

Solution

No if you do a hard kill on the application while a file was pre moved, then you would neeed manually to move these files from pre move, back into the source folder, so they can be picked up again

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top