How to release a data subscription?
Because just a single client can keep the subscription open the API exposes a method that allows to release a subscription by forcing a connected client to drop:
void release(long id);
void release(long id, String database);
Parameters | ||
---|---|---|
id | long | Subscription identifier. |
database | string | Name of database to create a data subscription. If null , default database configured in DocumentStore will be used. |
Example
store.subscriptions().release(id);