Upgrade to Pro — share decks privately, control downloads, hide ads and more …

File Connector With Mule ESB

File Connector With Mule ESB

File Connector With Mule ESB

Jitendra Bafna

May 17, 2017
Tweet

More Decks by Jitendra Bafna

Other Decks in Technology

Transcript

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.