TipcMsgGetMessageId


Name

TipcMsgGetMessageId — get the message identifier property of a message

Synopsis

T_BOOL TipcMsgGetMessageId(msg, message_id_return) 
T_IPC_MSG msg; 
T_STR *message_id_return; 

Arguments

msg — message to get identifier from

message_id_return — storage for message identifier

Return Values

TRUE if the identifier was successfully retrieved from the message, FALSE otherwise.

Diagnostics

If TipcMsgGetMessageId fails, it returns FALSE and set the global SmartSockets error number to one of:

Description

TipcMsgGetMessageId gets the unique message identifier property of a message. The message identifier property is a string that represents a unique identifier for the message. Applications of messages are free to use the message identifier for any purpose.

Caution

If TipcMsgGetMessageId returns FALSE, it does not store a value in message_id_return. Do not modify the value stored in message_id_return. It points directly into an internal data structure.

See Also

TipcMsgGenerateMessageId, TipcMsgSetCorrelationId, TipcMsgGetCorrelationId

Examples

This example prints the message identifier of a message:

T_STR id; 
if (!TipcMsgGetMessageId(msg, &id)) { 
  return;  /* error */ 
} 
TutOut("msg had identifier %s\n", id ? id : "<NULL>"); 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com