This documentation is for WSO2 Enterprise Integrator version 6.1.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
Skip to end of metadata
Go to start of metadata

The WSO2 Enterprise Integrator (WSO2 EI) file inbound protocol is a multi-tenant capable alternative to WSO2 EI VFS transport. The WSO2 EI file inbound protocol uses the VFS transport to process files in a specified source directory. After processing the files, it moves them to a specified location or deletes them. Note that files cannot remain in the source directory after processing or they will be processed again, so if you need to maintain these files or keep track of the files that are processed, specify the option to move them instead of deleting them after processing. 


The file inbound protocol supports the FTPS protocol with Secure Sockets Layer (SSL). The configuration is identical to other protocols. The only difference is the URL prefixes and parameters.  For more information, see VFS URL parameters.

Failure tracking

To track failures in file processing that can occur when a resource becomes unavailable, the VFS transport creates and maintains a failed records file. This text file contains a list of files that failed to processed. When a failure occurs, an entry with the failed file name and timestamp is logged in the text file. When the next polling iteration occurs, the VFS transport checks each file against the failed records file, and if a file is listed as a failed record, it will skip processing and schedule a move task to move that file.

<inboundEndpoint xmlns="" 
				 name="file" sequence="request" 
      <parameter name="interval">1000</parameter>
      <parameter name="sequential">true</parameter> 
      <parameter name="coordination">true</parameter> 
      <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
      <parameter name="transport.vfs.MoveAfterProcess">file:///home/user/test/out</parameter>
      <parameter name="transport.vfs.FileURI">file:///home/user/test/in</parameter>
      <parameter name="transport.vfs.MoveAfterFailure">file:///home/user/test/failed</parameter>
      <parameter name="transport.vfs.FileNamePattern">.*.txt</parameter>
      <parameter name="transport.vfs.ContentType">text/plain</parameter>
      <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>

VFS service-level parameters

The VFS transport does not have any global parameters to be configured. Rather, it has a set of service-level parameters that must be specified for each proxy service that uses the VFS transport. For information on how to configure the file inbound protocol for FTP, SFTP and FILE connections, see Configuring File Inbound Protocol for FTP, SFTP and FILE Connections .




Possible Values

Default Value

intervalThe time duration in milliseconds between two file scans that checks for updates.Yes

sequentialFiles will be processed sequentially when this parameter is set to true.Yes

This should be true for clustered deployments in order to prevent two nodes from retrieving the same file.


transport.vfs. FileURI

The URI where the files you want to process are located. You can specify connection-level parameters on the URL.


A valid file URI in the following form:

transport.vfs. ContentType

Content type of the files processed by the transport. To specify the encoding when reading a file, follow the content type with a semi-colon and the character set. For example:

<parameter name="transport.vfs.ContentType“>text/plain;charset=UTF-32</parameter>
When writing a file, you can set a different encoding with the CHARACTER_SET_ENCODING property:
<property name="CHARACTER_SET_ENCODING" value="UTF-8" scope="axis2" type="STRING"/>


A valid content type for the files (e.g., text/xml). You can specify the encoding after the content type, such as: text/plain;charset=UTF-32

transport.vfs. FileNamePattern

If the VFS listener should process only a subset of the files available at the specified file URI location, use this parameter to select those files by name using a regular expression.


A regular expression to select files by name (e.g., *\.xml)

transport.vfs. ActionAfterProcess

Whether to move or delete the files after the transport has processed them.




transport.vfs. ActionAfterFailure

Whether to move or delete the files if a failure occurs.




transport.vfs. MoveAfterProcess

Where to move the files after processing if the value specified as transport.vfs.ActionAfterProcess is MOVE .

Yes, if

A valid file URI

transport.vfs. MoveAfterFailure

Where to move the files after processing if the value specified as transport.vfs.ActionAfterFailure is MOVE .

Yes, if

A valid file URI

transport.vfs. ReplyFileURI

The location where reply files should be written by the transport.


A valid file URI

transport.vfs. ReplyFileName

The name for reply files written by the transport.


A valid file name


transport.vfs. MoveTimestampFormat

The pattern/format of the timestamp added to file names as prefixes when moving files.


A valid timestamp pattern
(e.g., yyyy-MM-dd'T'HH:mm:ss.SSSZ )

transport.vfs. Streaming

Whether files should be transferred in streaming mode, which is useful when transferring large files.


true or false


transport.vfs. ReconnectTimeout

Reconnect timeout value in seconds to be used in case of an error when transferring files.


A positive integer

30 sec

transport.vfs. MaxRetryCount

Maximum number of retry attempts in case of errors.


A positive integer


transport.vfs. MoveAfterFailedMove

The location to move a failed file.


A valid file URI

transport.vfs. FailedRecordsFileName

The name of the file that maintains the list of failed files.


A valid file name


transport.vfs. FailedRecordsFile Destination

The location to store the failed records file.


A folder URI


transport.vfs. MoveFailedRecord TimestampFormat

The time stamp format for entries in the failed records file. The failed records file maintains the name of the file that failed and the timestamp of its failure.


A valid timestamp pattern
(e.g., yyyy-MM-dd'T'HH:mm:ss.SSSZ )

dd-MM-yyyy HH:mm:ss

transport.vfs. FailedRecordNext RetryDuration

The time in milliseconds to wait before retrying the move task.


A positive integer

3000 milliseconds


By default, file locking is enabled in the VFS transport. This parameter lets you configure the locking behavior on a per service basis. You can also disable locking globally by specifying the parameter at the receiver level and selectively enabling locking only for a set of services.


enable or disable


transport.vfs. FileProcessCountThis parameter allows you to throttle the VFS listener by processing files in batches. Specify the number of files you want to process in each batch. If you specify a value for thisNoA positive integer, such as 10N/A

transport.vfs. FileProcessInterval

The interval in milliseconds between file processing batches.NoA positive integer, such as 1000N/A


This applies only in cluster deployments. Set to true if you need to avoid multiple servers trying to process the same file simultaneously.Notrue or falseN/A


The timeout period in seconds for the distributed lock.NoA positive integer, such as 10N/A


Set to true if you need to release locking in order to avoid files not being processed due to faulty locking. This works together with the transport.vfs.AutoLockReleaseInterval and transport.vfs.LockReleaseSameNode parameters. Notrue or falseN/A


Lock release interval in milliseconds.NoA positive integer, such as 1000N/A


Set to true if you need to release the locks only accrued by the same worker node.
If this is set to false, locks accrued by other nodes will be released according to the value specified in transport.vfs.AutoLockReleaseInterval .
Notrue or falsetrue
transport.vfs.FileSortAttributeThe attribute by which the files should be sorted and processed.NoNONE, Name, Size and LastmodifiedtimestampN/A
transport.vfs.FileSortAsscendingThe sort order to sort and process the files. If set to true files will be sorted in ascending order based on the attribute you specify in transport.vfs.FileSortAttribute. Notrue or falsetrue
transport.vfs.CreateFolderSet to true to create a folder if a folder does not exist when moving files.Notrue or falsefalse
transport.vfs.SubFolderTimestampFormatThe pattern/format of the timestamps added to the folder structure when moving files. You need to set transport.vfs.CreateFolder to true to in order to specify a value for this parameter.NoA valid timestamp pattern 
(e.g., yyyy-MM-dd'T'HH:mm:ss.SSSZ )
transport.vfs.BuildSet to true if you need to build the content inside the file before injecting the file to the mediation engine. If there is a build error, the file will not be injected to the mediation engine.Notrue or falsefalse


If you specify the transport.vfs.FileProcessCount parameter you do not need to specify the transport.vfs.FileProcessInterval parameter in a configuration, and vice versa. This is because the transport.vfs.FileProcessCount parameter and the transport.vfs.FileProcessInterval parameter cannot be used at the same time.


For a sample that demonstrates how to use the file system as an input medium via the inbound file listener, see  Sample 900: Inbound Endpoint File Protocol Sample (VFS).

  • No labels