Open topic with navigation

# 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

## SubMessages

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

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO FTL® - Enterprise Edition

Copyright © 2009-2024. Cloud Software Group, Inc. All Rights Reserved.