Message Ownership

Either your program code owns a message, or the TIBCO FTL library owns it. Ownership depends in part upon message origin, but releasing a message can change its ownership.

Release of Message Ownership

Subscribers can release ownership of inbound messages. Such released inbound messages belong to your program code, effective upon dispatch to your callback.

Tip: Releasing messages is appropriate when a callback delegates message processing to a separate thread.

To enable release to callback behavior, the program must supply a property to the subscriber create call.

Message Ownership, Determining Factors
Origin Released Ownership
Local No Your program code owns a local message.
Inbound No The library owns an inbound message.
Release to callback Your program code owns an inbound message that the subscriber has released to the callback.

Destruction

The responsibility to destroy a message depends entirely on the current ownership of a message.

Message, Responsibility to Destroy
Ownership Responsibility to Destroy
Program code Program code
Library Library

Sub-Messages

When program code owns a message that contains nested sub-messages, destroying the outer message does not automatically destroy sub-messages contained within its fields or arrays. To effectively reclaim storage, the program must first destroy all the inner sub-messages and then the outer message.