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. 

Icon

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

Attributes

Destination Configuration

Click the ellipsis button to provide the lcation of the destination directory.

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.

Expert Properties

Enable the Expert Properties view to configure these properties.

Icon
 Expert properties are meant for advanced users; use with caution.


Figure 2: Sample FileReceiver Configuration

Pre Processing XSL Configuration

Pre Processing XSL configuration can be used to transform request message before processing it. Click the ellipses button against the property to configure the properties.

Refer to the Pre/Post Processing XSL Configuration section under the Common Configurations page for details regarding Pre Processing XSL configuration and Post Processing XSL configuration (below).

Post Processing XSL Configuration

Post Processing XSL configuration can be used to transform the response message before sending it to the output port.

Threadpool Configuration

This property is used when there is a need to process messages in parallel within the component, still maintaining the sequence from the external perspective.

Refer to the Threadpool Configuration section under the Common Configurations page.

Validating the configuration

To validate the configuration, open the CPS after enabling the Use Separate Process CPS option and click the Validate button.


Figure 3: Validating the configuration

Icon

This validation does not check the existence of the destination directory.

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 4: 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 5: Input from Feeder component

Sample Output

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


Figure 6: 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.
Icon

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

Adaptavist ThemeBuilder EngineAtlassian Confluence