- Configuration and Testing
- Expert Properties
- Validating the configuration
- FileTransmitter Ports
- FileTransmitter Commands
- Functional Demonstration
- Useful Tips
The FileTransmitter component reads files from the file system and sends their contents to the output port. Data from the source file is read as bytes and is sent to the output port as chunks. The component provides flexible monitoring capabilities and ensures reliable data transfer.
Configuration and Testing
The Configuration property sheet of File Transmitter is shown in the figure below.
Figure 1: Sample FileTransmitter Configuration
Numberofbytesof the source file to be sent in each packet.
Click the ellipsis button to provide the lcation of the Source directory.
The directory from where the FileTransmitter picks the files to be transmitted.
Transmitter sends a Start packet to know the existence of receiver(s). This timeout is the time (in milliseconds) to wait before resending a Start packet.
Packets per update
Numberofpacketstobesent before saving the transfer state to disk.
Status on Percentage Increase
Maximumincreaseinpercentage completion before the FileTransmitter sends another status report.
Status on Packets Transmitted Count
Maximumincreaseinthe number of chunks sent before the FileTransmitter sends another status report.
Status on Delay Interval
Maximum delay, in milliseconds, before the FileTransmitter sends another status report.
Delay before retransmission
Delay, in milliseconds, after which the FileTransmitter calculates the file status from the receiver and sends retransmissions.
Enable the Expert Properties view to configure these properties.
Figure 2: Sample FileTransmitter 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.
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
- Command - Accepts the commands.
- Acknowledgement - Receives acknowledgments from the connected FileReceiver component.
- Data – Sends file data
- Status – Sends the status of file(s) being transmitted.
Initiates the file transfer to the FileReceiver component.
Syntax: Send <sourceFileName> [o/O] [DestinationDirectory]
Send Sample.txt o destDir\
Send Sample1.txt O destDir\Sample2.txt
Send Sample1.txt destDir\subDir\Sample2.txt
Aborts the transfer of the file specified and sends a kill packet to the connected File receiver which in turn deletes the file being transferred.
Syntax: Stop <sourceFileName>
Example: Stop Sample1.txt
Puts the FileTransmitter into the paused state, which suspends file transfers until the Resume command is entered.
Take the FileTransmitter out of the paused state, the file transfers resumes.
This command sends out:
- The state of the FileTransmitter (Paused or Running).
- Names of files for which the transfer has to be resumed (to send the missing packets).
- Names of files that are yet to be transmitted.
Below figure shows the event process where a FileTransmitter accepts commands from the Feeder and transmits the files to FileReceiver upon request.
Figure 4: Event process showing the File Transfer components
Transmitting a file.
Below figure shows the sample input from the Feeder.
Figure 5: Sample input from the Feeder
Below figure shows the status messages sent by the FileTransmitter component.
Figure 6: Status messages sent by the FileTransmitter component
Requesting a report on the current state of FileTransmitter. In this scenario, 1000 send requests are being sent as shown below and then a Status command is sent as shown in the Sample Input to know the files which need data to be resent, the files that are yet to be sent and the current state of transfer (paused/in progress).
Figure 7: Information dialog box
Figure 8: Sample input
Figure 9: Sample output
- 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 Start timeout needs to be tuned appropriately to a higher value in order to avoid FileTransmitter sending multiple Start packets unnecessarily.
- The component's cache must always be set to yes, otherwise the component will not be able to resume a transfer on restart.