I'm using Apache Camel to read files from an FTP server. It has to be listening for new files without being restarted by several days. Some days there are files to download, other days there aren't.
The first issue I had was that when I put files in the FTP folder after a long period of inactivity (a day for example), the files were not picked by Apache Camel and I had to restart it to make it work.
So I thought that the disconnect
flag could be useful for this case. However, when I use the disconnect flag I get the following error:
org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: null Connection is not open. Code: 221
The files are download and left in the preMove
folder, but they are not moved to the final archive folder specified in move
. So my guess was that the connection is closed after the file is read and moved to the preMove folder, but when it tries to move to the archive folder it fails. However I tried removing the preMove
option and it still fails, which makes me think the move
flag is what's causing the problem.
Is there a way to workaround this issue?