Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

FTP Connector With Mule ESB

DZone's Guide to

FTP Connector With Mule ESB

This tutorial will show you how to use the FTP connector as inbound or outbound in a Mule flow to send files to a destination.

· Integration Zone ·
Free Resource

SnapLogic is the leading self-service enterprise-grade integration platform. Download the 2018 GartnerMagic Quadrant for Enterprise iPaaS or play around on the platform, risk free, for 30 days.

The FTP Connector implements a file transport channel so that your Mule application can exchange files with an external FTP server. You can configure FTP as an inbound endpoint (which receives files) or outbound endpoint (which writes files to the FTP server). The FTP transport allows integration of the File Transfer Protocol into Mule. Mule can poll a remote FTP server directory, retrieve files. and process them as Mule messages. Messages can also be uploaded as files to a directory on a remote FTP server. Default behavior of the inbound FTP connector is it will pick the file and delete from source folder.

FTP Connector as Inbound

Drag and drop the FTP connector to the canvas and place it at the message source.

Configure the FTP connector and provide the information like host, port, path, username, and password.

Image title

Image title

As a default, the behavior of the FTP connector is to read the file and delete it from the FTP server. There is an option available with the FTP connector that instead of deleting the file, you can move it to a backup folder on the FTP server.

Click on the plus (+) button under the connector configuration and it will open a new dialog window. Now navigate to the Advanced tab.

Image title

Select the radio button "Configure a folder" to move the files and configure Move to Directory and the Filename pattern.

Image title

FTP Connector as Outbound

The FTP connector can be configured as Outbound to send the file to the destination. For the FTP connector to work as Outbound, place the FTP connector in the message processor region of the Mule flow.

Image title

Here is the Video Tutorial


Now, you know how to implement FTP connector in Mule flow.

With SnapLogic’s integration platform you can save millions of dollars, increase integrator productivity by 5X, and reduce integration time to value by 90%. Sign up for our risk-free 30-day trial!

Topics:
mulesoft ,tutorial ,mule esb ,connectors ,integration

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}