TipcSrvSubjectGetSubscribe


Name

TipcSrvSubjectGetSubscribe — determine if an RTclient is subscribing to a subject

Synopsis

T_BOOL TipcSrvSubjectGetSubscribe(subject, subscribe_status_return) 
T_STR subject; 
T_BOOL *subscribe_status_return; 

Arguments

subject — name of the subject to get subscribe status for

subscribe_status_return — storage for subscribe status

Return Values

TRUE if the subscribe status of the subject was successfully retrieved, FALSE otherwise.

Diagnostics

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

Description

TipcSrvSubjectGetSubscribe gets whether an RTclient is subscribing to a subject. The subscribe status controls whether the RTclient receives messages published (sent) to that subject. If the subscribe status of subject is TRUE, the RTclient receives messages with subject as their destination that are sent to RTserver. To start or stop subscribing to a subject, use TipcSrvSubjectSetSubscribe. To find out if an RTclient is subscribing to a subject, including load balancing information, use TipcSrvSubjectGetSubscribeLb.

TipcSrvSubjectGetSubscribe may attempt to automatically create a connection to RTserver. TipcSrvSubjectGetSubscribe gets the subscribe status of the subject for both full and warm RTclient connections. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.

Caution

If TipcSrvSubjectGetSubscribe returns FALSE, it does not store a value in subscribe_status_return.

See Also

TipcMonClientSubscribeSetWatch, TipcMonSubjectSubscribeSetWatch, TipcSrvSubjectSetSubscribe, TipcSrvSubjectGetSubscribeLb

Examples

This example gets the subscribe status of the subject /system/thermal:

T_BOOL subscribe_status; 
if (!TipcSrvSubjectGetSubscribe("/system/thermal", 
&subscribe_status)) { 
  return;  /* error */ 
}  
TutOut("This process is %s the /system/thermal subject.\n", 
       subscribe_status ? "subscribing to" : "not subscribing to"); 

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