SDK
SDK C# v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

UnsubscribeAsync #

Removes a subscription.

Arguments #

public async Task UnsubscribeAsync(string roomId);
ArgumentTypeDescription
room_id
string&
Subscription room ID

Exceptions #

Throws a KuzzleException if there is an error. See how to handle error.

Usage #

NotificationHandler listener = (notification) => {};
try {
  string room_id = await kuzzle.Realtime.SubscribeAsync(
    "nyc-open-data",
    "yellow-taxi",
    new JObject(),
    listener);
  await kuzzle.Realtime.UnsubscribeAsync(room_id);
  Console.WriteLine("Successfully unsubscribed");
} catch (KuzzleException e) {
  Console.WriteLine(e);
}