Migrating to the FTP and SFTP Connectors

The FTP and SFTP transports were utterly rewritten. They evolved off from the Mule three transport model into associate degree operation primarily based instrumentation. this permits several new capabilities:
the power to browse files or absolutely list directory contents on demand, not like the recent transport, that solely provided a polling incoming termination.
commanding support for common filing system operations like repetition, moving, renaming, deleting, making directories, and more.
Support for lockup files at the filing system level.

Advanced file matching practicality.

Furthermore, they were designed to be
utterly symmetrical. this suggests that, apart from the association configuration, they appear and behave alike and have the precise same feature set. moreover, they additionally match the options and behavior of the File instrumentation.

 

Connecting to an FTP or SFTP Server

Migrating an FTP Connection

Mule 3 Example: FTP Inbound Connection with Polling
<ftp:inbound-endpoint host="localhost"
 port="21" path="path/to/file"
 user="myusername" password="maypassword"
 pollingFrequency="4000" responseTimeout="10000"  metadata:id="5571009e-a278-4a01-ac1d-4102113b52ad"
 doc:name="FTP">
    <reconnect-forever frequency="3000"/>
</ftp:inbound-endpoint>
This example shows a simple Mule 4 FTP configuration.
Mule 4 Example: FTP Connection
<ftp:config name="ftp">
  <ftp:connection username="anonymous"
   password="password" host="localhost"
   port="${ftpPort}" workingDir="${workingDir}"/>
</ftp:config>

Comments