SDK
SDK Java 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.

This SDK has been deprecated because of stability issues. It is not advised to use it in a production environment.

unsubscribe #

Removes a subscription.

Arguments #

void unsubscribe(String roomId)
void unsubscribe(String roomId, io.kuzzle.sdk.QueryOptions options)

ArgumentsTypeDescription
roomId
String
Subscription room ID
options
io.kuzzle.sdk.QueryOptions
Query options

options #

Additional query options

OptionType
(default)
Description
queuable
boolean

(true)
Make this request queuable or not

Exceptions #

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

Usage #

NotificationListener listener = new NotificationListener() {
  public void onMessage(NotificationResult notification) {}
};
try {
  String roomId = kuzzle.getRealtime().subscribe(
    "nyc-open-data", 
    "yellow-taxi", 
    "{}", 
    listener
  );
  kuzzle.getRealtime().unsubscribe(roomId);
  System.out.println("Success");
} catch (KuzzleException e) {
  System.err.println(e.getMessage());
}