Skip to main content
Skip table of contents

FileReceiver

The FileReceiver component writes the data received on its input port to the output file specified by the user.The component provides flexible monitoring capabilities and robust acknowledgement mechanism. 

FileTransmitter and FileReceiver components work together as a unit. These components should not be decoupled.

Configuration and Testing

The Configuration property sheet of File Receiver is shown below.


Figure 1: Sample FileReceiver Configuration

The table below provides description for the properties in the CPS.

Property

Description

Destination Directory

Directory where the files being received are to be put by default (in case the 'Send' command doesn't specify the destination directory). Relative destination path names specified in the 'Send' command would be evaluated under this directory.

Abort on restart

'Yes' aborts all file transfers in progress when the component restarts.

Restart timeout

Time (in milliseconds) to wait before resending the receipt status of a particular file to the Transmitter.

Abort timeout

Time (in milliseconds) to wait before sending an Abort packet to the Transmitter to abort transfer of a particular file.

Number of packets to receive before acknowledging

Number of packets to receive before sending the chunk receipt status to the corresponding Transmitter.

Status on Percentage Increase

Maximum increase in percentage completion before the FileReceiver sends another status report.

Status on Packets Received Count

Maximum increase in the number of chunks received before the FileReceiver sends another status report.

Status on Delay Interval

Maximum delay, in milliseconds, before the FileReceiver sends another status report.

The configuration can be validated using the 'Validate' button.Note that this button doesn't check the existence of the destination directory. Successful result of the Validate operation appears as below.


Figure 2: Validating the configuration

FileReceiver Ports

Input Ports

  • Data – Receives file data.

Output Ports

  • Status – Sends the status of file(s) being received.
  • Acknowledgement – Sends acknowledgements to the File Transmitter(s).

Functional Demonstration

Below figure shows the event process where a FileReceiver receives files transmitted by FileTransmitter.


Figure 3: Event process showing the File Transfer microservices

Scenario 1

FileReceiver receiving a file transmitted by the FileTransmitter.

Sample Input

The below shown input is sent to the FileTransmitter from the Feeder.


Figure 4: Input from Feeder component

Sample Output

The below shown figure shows the status messages sent by the FileReceiver component.


Figure 5: Status message from FileReceiver component

Useful Tips

  • Make sure that the three properties Status on Percentage Increase, Status on Packets Transmitted Count, and Status on Delay Interval are configured depending on the requirement. If all the three are set to small values, the component sends many status messages.
  • If file transfer is across internet, the property Restart timeout needs to be tuned appropriately to a higher value in order to avoid FileReceiver sending additional acknowledgements unnecessarily.
  • The component's cache must always be set to yes, otherwise the component will not be able to resume a transfer on restart.

To understand the service better, refer the File Transfer example which demonstrates FileReceiver service features.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.