Method UnSubscribe
UnSubscribe()
This method unsubscribes the topic.
Declaration
void UnSubscribe()
Remarks
You can use this method to allow the subscriber to unregister from the topic, i.e., the subscriber will not receive any messages in the future.
Examples
The following example demonstrates how to unsubscribe the subscription.
ITopicSubscription topicSubscription = _topic.CreateSubscription(messageReceivedCallback);
topicSubscription.UnSubscribe();