UnsubscribeAsync Method
UnsubscribeAsync(Guid)
Unsubscribe from events.
Declaration
ValueTask<bool> UnsubscribeAsync(Guid subscriptionId)
Parameters
Guid | subscriptionId | The unique identifier of the subscription. |
Returns
ValueTask<Boolean> | Whether the operation was successful. |
Remarks
Once this method has been invoked, and whatever its result, the subscription is de-activated, which means that no events will trigger anymore, even if the client receives event messages from the servers.
If this method returns false
, then one or more client connection has not
been able to get its server to remove the subscription. Even though no events will
trigger anymore, the server may keep sending (ignored) event messages. It is therefore
recommended to retry unsubscribing until it is successful.