pfx-sftp:parameters
Used when you have already defined an SFTP connection.
Properties
Option | Type | Default | Description |
---|---|---|---|
| string | Â | Defines a name of the connection to use to connect to the SFTP server. |
Examples
Connect to SFTP using predefined connection:
<route>
    <from uri="pfx-sftp:parameters?connection=mySftpConnection&doneFileName=fileConn.done"/>
    <log message="Raw file = ${body}"/>                 Â
    <to uri="mock:test"/>
</route>
Â
Usage in a from endpoint:
<from uri="pfx-sftp:parameters?connection={{sftp.connection}}&directory={{sftp.directory}}&delete=true&streamDownload=true&stepwise=false&useUserKnownHostsFile=false"/>
Parameters:
directory={{sftp.directory}} – Specifies a remote directory from which files should be consumed. The value is set using the
{{sftp.directory}}
placeholder, indicating that the actual directory will be provided at runtime, through configuration properties.delete=true – Indicates that files should be deleted from the remote directory after they have been successfully consumed.
streamDownload=true – Configures the endpoint to download files using streaming, which can be beneficial for large files as it avoids loading the entire file into memory.
stepwise=false – Specifies that subdirectories should not be traversed recursively. Only files directly within the specified directory should be processed.
useUserKnownHostsFile=false – Disables the use of the user-known-hosts file for host verification. This might be useful in some scenarios where strict host key checking is not required.
Â
Usage in a to endpoint:
<to uri="pfx-sftp:parameters?connection={{sftp.connection}}&fileName=/${header.lpg_file_name}&useUserKnownHostsFile=false&doneFileName=%24%7Bfile:name%7D.done&fileExist=Append"/>
fileName=/${header.lpg_file_name} – Specifies the name of the file to be sent to the remote SFTP server. The value is set dynamically using the
${header.lpg_file_name}
header, indicating that the file name will be obtained from the specified header at runtime.useUserKnownHostsFile=false – Disables the use of the user-known-hosts file for host verification. This might be useful in scenarios where strict host key checking is not required.
doneFileName=%24%7Bfile:name%7D.done – Specifies a file with the extension ".done" that signals the completion of the file transfer. The file name is based on the original file name with the ".done" extension appended. The
%24%7Bfile:name%7D
part is URL-encoded for${file:name}
, which represents the original file's name.fileExist=Append – Specifies the behavior when a file with the same name already exists on the remote server. In this case, it is set to append data to the existing file.
Â
IntegrationManager version 5.8.0