-
Bug
-
Resolution: Done
-
Major
-
6.3
-
None
-
Sprint 2018-39, Sprint 2019-40, Sprint 2019-41, Sprint 2019-42, Sprint 2019-43
-
According to the document(1), `soTimeout` is used only for `FTP and FTPS`, not SFTP.
However, as long as I read the source code(2), `soTimeout` is used for `Session.setTimeout()`(3) of SFTP. I guess this is a documentation bug.
The source code(2) was fixed by CAMEL-8757(4). I think the modification of the document was missed when to fix.
By the way, our community document(5) is also not correct.
(1) Fuse Document
https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.3/html-single/apache_camel_component_reference/#IDU-FTP2
~~~
- connectTimeout
- Camel 2.4: Is the connect timeout in millis. This corresponds to using ftpClient.connectTimeout for the FTP/FTPS. For SFTP this option is also used when attempting to connect.
- soTimeout
- FTP and FTPS Only:Camel 2.4: Is the SocketOptions.SO_TIMEOUT value in millis.
- timeout
- FTP and FTPS Only:Camel 2.4: Is the data timeout in millis. This corresponds to using ftpClient.dataTimeout for the FTP/FTPS. For SFTP there is no data timeout.
~~~
- FTP and FTPS Only:Camel 2.4: Is the data timeout in millis. This corresponds to using ftpClient.dataTimeout for the FTP/FTPS. For SFTP there is no data timeout.
(2) org/apache/camel/component/file/remote/SftpOperations.java
// set the SO_TIMEOUT for the time after the connect phase if (configuration.getSoTimeout() > 0) { session.setTimeout(configuration.getSoTimeout()); }
(3) com.jcraft.jsch.Session Java Doc
https://epaul.github.io/jsch-documentation/simple.javadoc/com/jcraft/jsch/Session.html#setTimeout-int-
~~~
sets the timeout setting. This value is used as the socket timeout parameter, and also as the default connection timeout.
~~~
(4) [CAMEL-8757] SO_TIMEOUT not really set on SFTP connections
(5) Community Document
http://people.apache.org/~dkulp/camel/ftp2.html
~~~
- connectTimeout
- Camel 2.4: Is the connect timeout in millis. This corresponds to using ftpClient.connectTimeout for the FTP/FTPS. For SFTP this option is also used when attempting to connect.
- soTimeout
- FTP and FTPS Only: Camel 2.4: Is the SocketOptions.SO_TIMEOUT value in millis. Note SFTP will automatic use the connectTimeout as the soTimeout.
- timeout
- FTP and FTPS Only: Camel 2.4: Is the data timeout in millis. This corresponds to using ftpClient.dataTimeout for the FTP/FTPS. For SFTP there is no data timeout.
~~~
- FTP and FTPS Only: Camel 2.4: Is the data timeout in millis. This corresponds to using ftpClient.dataTimeout for the FTP/FTPS. For SFTP there is no data timeout.