...
The necessary classes can be found in the synapse-vfs-transport.jar
file. Unlike the transports described previously, VFS transport does not have any global parameters to be configured. Rather, it has a set of service level parameters that needs to be specified for each service. VFS transport implementation is mainly used and mostly effective in the WSO2 ESB.
Starting from Carbon version 4.0.0, VFS transport supports the FTPS protocol. Configuration is identical to other protocols with the only difference being the URL prefixes.
...
Since VFS transport deals with file operations , there are instances certain time that these can fail due to unavailability of some resource. In such an instance, the a case VFS transport is equipped with the following fault - handling mechanism.
When a failure occurs in a file object, that will be marked as a fail record and will be moved to location (configured by the user) where move error file objects are kept. The failed record will be maintained maintain inside a text file ( file name is configurable) and the location of that file will be provided by the user. When the next polling iteration is going on, it will check the file against the failed record and if the file is a failed record, it will skip processing and schedule a move task to move that file(the retry duration of the file move task can be configured). It's handled This is handle this way because it this is a random failure in the move operation.
VFS Service Level Parameters
...
Parameter Name | Description | Required | Possible Values | Default Value |
---|---|---|---|---|
transport.vfs. | The file URL from | Yes | A valid file URL |
|
transport.vfs. | Content type of the files | Yes | A valid content |
|
transport.vfs. | If the VFS listener | No | A regular |
|
transport. | The polling interval in | No | A positive integer |
|
transport.vfs. | Action to perform | No | MOVE, | DELETE |
transport.vfs. | Action to perform | No | MOVE, | DELETE |
transport.vfs. | The location to | Required if | A valid file URI |
|
transport.vfs. | The location to | Required if | A valid file URI |
|
transport.vfs. | The location to | No | A valid file URI |
|
transport.vfs. | The name for reply files | No | A valid file | response.xml |
transport.vfs. | The pattern/format | No | A valid timestamp |
|
transport.vfs. | If files should be transferred | No | true, false | false |
transport.vfs. | Reconnect timeout | No | A positive | 30 sec |
transport.vfs. | Maximum number of | No | A positive | 3 |
transport.vfs. | When writing the This should be By default the | No | true, false | false |
transport.vfs. | New destination | No | A valid file URI |
|
transport.vfs. | The file name to maintain | No | A valid file name | vfs-move- |
transport.vfs. | The destination of the | No | A folder URI | repository |
transport.vfs. | When adding a record | No | A valid timestamp | dd-MM- |
transport.vfs. | The time in milli | No | A positive | 3000 milli |
...
transport.vfs.Locking | By-default file locking is | No | enable or disable | enable |
For a demonstration of how VFS works, see the following samples in WSO2 ESB documentation: