While writing files into SFTP how to setup timeout as paramter into qie.writesftp

0 votes
asked Jan 11 by satya-kiran-k-9137 (200 points)

1 Answer

0 votes

You can use the custom apache options:

String ftpParameters additional custom camel ftp parameters to be used by this connection. (Format: {key}={value}\n{key2}={value2}...)

Per the camel specifications, there is a few timeout options.

connectTimeout - Sets the connect timeout for waiting for a connection to be established Used by both FTPClient and JSCH.
timeout - Sets the data timeout for waiting for reply Used only by FTPClient.

This would look like this on the qie.writeSFTPFile call

qie.writeSFTPFile('host', port, 'path', binary, passive, 'connectTimeout=10000\ntimeout=300000', 'userName', 'password', data, 'sshKeyName*');

answered Jan 12 by brandon-w-8204 (32,530 points)