Tibems.GetMessageSize


Method

Declaration

static int GetMessageSize( 
    Message msg ); 
 
static int GetMessageBodySize( 
    Message msg ); 
 
static int GetMessageHeadersSize( 
    Message msg ); 
 
static int GetMessagePropertiesSize( 
    Message msg ); 
 

Purpose

Return the size of a wire format message—or its body, header or properties portions.

Remarks

These four methods return cached values for the size of a message or its parts.

The sizes are implicitly measured and cached when an inbound message arrives at the client, and when the client sends an outbound message. If the client modifies a message, or creates a message but never sends it, then these methods could yield incorrect cached values. To explicitly force a new measurement and cache its results, call Tibems.CalculateMessageSize; then these methods yield correct values.

GetMessageSize returns the total size of a message—that is, the number of bytes that traverse the network when the client sends the message. This total is slightly larger than the sum of its three constituent parts, because it includes additional control information. Furthermore, the server adds its own control information as well, so the size of message as measured by receivers is slightly larger than its size as measured by the sender.

Parameter
Description
msg
Return the cached size of this message, or one of its parts.

See Also

Tibems.CalculateMessageSize


TIBCO Enterprise Message Service™ .NET Reference
System Release 4.3, February 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com