9
ANYPOINT FILE CONNECTOR WITH MULESOFT

Anypoint File Connector With Mulesoft

Embed Size (px)

Citation preview

Page 1: Anypoint File Connector With Mulesoft

ANYPOINT FILE CONNECTOR WITH MULESOFT

Page 2: Anypoint File Connector With Mulesoft

FILE CONNECTOR

File Connector has capability of reading and writing the file to local system. It

can be implemented as an inbound endpoint (such as an Message Source) or as

an outbound endpoint. It can be only used as a one-way pattern.

• Reads the file at certain periods of time and delete, move or leave the file as

it is processed.

• Append the output to existing files.

• Copy files from one directory to another.

• Read input file and saving the input file to backup.

• Create new files with specific names.

Page 3: Anypoint File Connector With Mulesoft

FILE CONNECTOR AS AN INBOUND ENDPOINT

File Connector can act as an inbound endpoint if you place file endpoint at the

beginning of the flow. It will read the directory for new files after certain interval of

time and processed it. By default it uses streaming and Payload is InputFileStream.

• Place the file endpoint to the source section of the flow.

• It will check for file in directory after certain interval of time. This can be configured

according to your need.

• It triggers the flow when receives a file.

• It reads the file into payload and dispatches message to the next processor in the

flow.

Page 4: Anypoint File Connector With Mulesoft

FILE CONNECTOR AS AN INBOUND ENDPOINT

• Path is a target directory on a connected file system. Basically this would be the location on a

connected system where file will be placed to read by Message Source in Mule Flow.

• Move to Directory is used when we need to backup or move file to any another directory.

Here you can specify the path where you need to backup or move your input file.

• Move to Pattern is used when moving a file according to Move to Directory property. For

example, if we are using pattern #[message.inboundProperties.originalFilename].backup.

This means that your are appending the .backup to OriginalFileName.If your file name is

student.csv then it will move file to directory with new FileName student.csv.backup.

• Polling Frequency is specify how often the endpoint should check for incoming file. Default

value is 1000ms.

• File Name Regex Filter is used to configure a filter to restrict the files being processed. For

example if you have set pattern .*csv then it means inbound endpoint will only pick the file

with extension .csv and ignore rest of the file like .txt, .xlsx etc.

Page 5: Anypoint File Connector With Mulesoft

FILE CONNECTOR AS AN INBOUND ENDPOINT

Page 6: Anypoint File Connector With Mulesoft

FILE CONNECTOR AS AN OUTBOUND ENDPOINT

File Connector acts as an Outbound Endpoint if you place a building block at

the middle or end of the Mule flow (basically in the Message Processor Region),

passing the file to connected file system.

• Place the File Connector in the Message Processor of the Mule Flow to act as

an Outbound Endpoint.

• It is capable of creating new files or appending the message to existing file.

• Filename can be set at a runtime.

Page 7: Anypoint File Connector With Mulesoft

FILE CONNECTOR AS AN OUTBOUND ENDPOINT

Path is target directory on connected file system where we need to create new

files or appending the data to existing files.

File Name/Pattern is used to specify a filename or pattern for naming files that

are sent from the File endpoint to the connected file system. If not set, by

default it will used same file-name pattern used for incoming files.

Page 8: Anypoint File Connector With Mulesoft

FILE CONNECTOR AS AN OUTBOUND ENDPOINT

Page 9: Anypoint File Connector With Mulesoft

THANK YOU