Size property: Message class

Description

The Size property is the approximate size of the uncompressed XML data generated when the message is published. The availability and meaning of the Size property depends on the message type as follows:

  • For rowset-based message parts, the Size property is available and based on the estimated XML size.

  • For non-rowset-based messages, the Size property is available and based on the XML data size.

  • For container-based messages, the Size property is available on received messages only—that is for OnRequest or OnNotify PeopleCode events.

  • For container-based message parts, the Size property is available and based on the estimated XML size.

  • For document-based messages, the Size property is available and based on the XML data size.

The size is approximate for the following reasons:

  • The maximum size of fields is used except for the case of long text and image fields.

  • The active row count is used, without regard to whether the rows have been changed. In a CopyRowsetDelta, rows that are not changed, are not published.

  • It doesn't include the size of the XML tags.

This property can be used with the system property %MaxMessageSize in a batch Application Engine program to prevent the application from publishing a message that is too large.

This property is valid for both asynchronous and synchronous messages.

This property is read-only.

Example

If &MSG.Size > %MaxMessageSize Then
  &MSG.Publish();
Else
  /*Move more data into the message object */
End-If;