'Read TCP' activity only reads 1460 bytes in AIX

'Read TCP' activity only reads 1460 bytes in AIX

book

Article ID: KB0084793

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Problem Description:

When sending a 10,000 bytes message to AIX BW process from Windows, the receiver and read data process on AIX could only receive around 1460 bytes, while the same receiver process on Windows machine could receive 10,000 bytes.

Problem explanation:

For TCP level, it can guarantee the message sent will be received but it can not guarantee how long it will take to receive the entire message. If the message size is larger than Maximum Transmission Unit (MTU), the message will be sent in packages. Every package is no larger than MTU. And for the nature of network, no one can guarantee when the next package will be arrived.

Basically with given length to read, Read TCP Data will read up to the length bytes of data from the input stream of the socket or reach the end of input stream. End of stream may indicate 2 situations: 1. all the packages arrived (we expected )or 2. currently no more package to read (may still have more packages not arrived, not expected). That is the reason Read TCP Data activity sometimes can not read full of the message.

Solutions:

1)    If the receiver knows how large the message is, it can re-read the socket until the size fulfilled, please refer to attached project tibco_example.zip. This can be used when the message doesn't includes DBCS (Double Byte Character Set)

2)    This uses the same mechanism to control "Read TCP" activity with 1), but applies to the situation when the message includes DBCS where a packet may have unfinished DBCS and converting to "String" may result something nasty. Please refer to attached project tibco_example_4.zip

3)    The second mechanism to control "Read TCP" activity to read all incoming message is to define a signal as the end of message (like use user-defined separator) in "Read TCP" activity. The signal should not exist in the incoming message or only exists at the end of the whole message. Java method String.getBytes() can be used to transform String to byte array and check which string is suitable to be used as the signal. Please see the attached project tibco_example_3.zip.

Issue/Introduction

'Read TCP' activity only reads 1460 bytes in AIX

Attachments

'Read TCP' activity only reads 1460 bytes in AIX get_app
'Read TCP' activity only reads 1460 bytes in AIX get_app
'Read TCP' activity only reads 1460 bytes in AIX get_app