Open topic with navigation

TIBCO Rendezvous® 8.8.0

# tibrvMsg_Create()

Function

## Declaration

    tibrv_status tibrvMsg_Create(
        tibrvMsg*    message);
    tibrv_status tibrvMsg_CreateEx(
        tibrvMsg*    message,
        tibrv_u32    initialStorage);

## Purpose

Allocate storage and initialize it as a new message.

## Remarks

This function allocates storage for the new message. A program owns the messages that it creates, and must destroy them to reclaim the storage. That is, each call to this function must be paired with a call to tibrvMsg_Destroy().

Programs can add address information to the message using tibrvMsg_SetSendSubject(), and tibrvMsg_SetReplySubject().

## Message Size

When adding data to a message would overflow the allocated space, the message automatically expands by allocating additional storage. However, when creating messages that contain many small fields, you can optimize program performance by pre-allocating sufficient storage initially.

Parameter | Description
`message` | The function stores a pointer to the new message in this location.
`initialStorage` | Initial space (in bytes) to allocate for the message.

## See Also

tibrvMsg_Destroy()

tibrvMsg_Expand()

tibrvMsg_SetReplySubject()

tibrvMsg_SetSendSubject()

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 Rendezvous®

Copyright © 1997-2025. Cloud Software Group, Inc. All Rights Reserved.