TIBCO Enterprise Message Service 4.3.0 .NET Client Class Library

Tibems.GetMessageSize Method 

Returns the total wire size of the message which was received or sent.

public static int GetMessageSize(
   Message msg
);

Remarks

If a message was modified after it has been received, or if a message was created by the application but never sent, this method will produce incorrect result. In those cases call calculateMessageSize() before calling this method as well as getMessageBodySize and similar. Notice that total wire size of the message is the exact number of bytes sent over the network when an application sends the message. The total wire size of the message may be slightly greater than the summ of the wire size of message headers, properties and the body, due to extra control information encoded in the overal message wire representation. If the body of the message is compressed, this method returns the size of the wire representation using compressed body bytes. Notice that the server may add additional control information into the message before sending it to consumers. Thus the size of the received message is normally slightly bigger than the size of the same message when it was sent.
For complete details, see the corresponding item in the book TIBCO Enterprise Message Service .NET Reference.

Exceptions

Exception Type Condition
ArgumentException if parameter is null or is a foreign message implementation.

See Also

Tibems Class | TIBCO.EMS Namespace