Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Subscribing to and Receiving Events | Receiving Events in the Get-Events Model | Subscription Identifiers | Generating Subscription Identifiers
 
Generating Subscription Identifiers
You application may generate subscription identifiers itself or it may call one of the following webMethods Broker library functions to generate a subscription identifier.
The awMakeSubId function creates a subscription identifier for a specified Broker client. The first time it is called for a particular BrokerClient, it will return a value of 1. The second time it is called for the same BrokerClient, it will return a value of 2, and so on. The subscription identifiers are not guaranteed to be unique if your application disconnects and reconnects the BrokerClient, as described in Disconnecting and Reconnecting.
You may use the awMakeUniqueSubId function to create unique subscription identifiers for Broker clients that you intend to disconnect and reconnect. The awMakeUniqueSubId function contacts the Broker and looks up all the existing subscription identifiers in use by your application. It then assigns a subscription identifier that is guaranteed to be unique for all Broker clients that you may use. Another important feature is that after calling this function once, all subsequent calls to awMakeSubId will return unique subscription identifiers.