Subscribe(String,PubSubUpdateFlag) Method
- Last UpdatedApr 08, 2026
- 1 minute read
public void Subscribe(
string Topic,
PubSubUpdateFlag UpdateFlag
)
public:
void Subscribe(
String^ Topic,
PubSubUpdateFlag UpdateFlag
)
Parameters
- Topic
- The topic string to subscribe to.
- UpdateFlag
- Indicates whether integrity updates are required or not.
This routine is to be used with blocking receive. If subscriptions are made with this routine and receive is not called, then the application will not receive any messages and will eventually be removed from the PubSub system. If the application requires asynchronous delivery through callbacks, then SubscribeCB should be used.
This version of subscribing is useful if the application wants to process messages in a synchronous manner from a special processing thread, or a pool of such threads.
If this routine is called after any subscriptions are made with callbacks, then an exception will be raised indicating the use of incompatible subscription semantics.
This form of subscription is used with the
PubSubConnection PS = new PubSubConnection();
PS.OpenConnection("192.168.10.10", 5051);
PS.Subscribe("mySystem.MyTopic", PubSubUpdateFlag.PS_INTEGRITY);
Reference
PubSubConnection Class
PubSubConnection Members
Overload List
Receive
Receive