FTP component
The FTP component is able to connect to FTP servers (FTP, SFTP, FTPS) to write or read files. It can act either as an outbound (writing files to FTP) or inbound component (reading files from FTP).
When it is not the first component in a flow it acts as an outbound component (writing files to FTP) by default.
Basic configuration
The FTP component has the following basic configuration options:
Force inbound
This option is only available when the FTP component is not the first component in a flow. It overrules the default outbound mode (writing files) and forces the component into inbound mode (reading files).
Every time the FTP component polls the server it will create a list of all the available files. It will pick one to process, adhering to the Order by setting. This will happen as fast as the files can be downloaded until the list has been completed. Each file is treated as a seperate message that continues to follow your flow.
The body of the message before the FTP component will be overridden with the content of the consumed file. Headers with information about the file will be set, for instance filename and filesize. Refer to the Camel File - Message headers documentation for an extensive explanation.
The FTP component will wait the specified Delay time before polling the server again after reading (multiple) files. Files that are added while finishing the previous list won't be processed until this next poll of the server.