SDK
SDK Javascript v5.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.

renew #

Renew the subscription. Force a new subscription using the same filters if no new ones are provided.

Unsubscribes first if this Room object was already listening to events.


renew([filters], notificationCallback, subscriptionCallback) #

Arguments Type Description
filters JSON Object Filters
notificationCallback function Function called each time a notification is received
subscriptionCallback function Function called with the subscription result

Usage #

Copied to clipboard!
room.renew({in: {field: ['some', 'new', 'filter']}}, function (err, res) {
  // called each time a change is detected on documents matching this filter
  // check the Room/Notifications section of this documentation
  // to get notification examples
}, function (err, res) {
  // handles the subscription result
});