Core
Framework v2.x
2

remove() #

Available since 2.22.0

Removes a realtime subscription on the specified connection.

This method is a backend version of the realtime:unsubscribe API action.

This method can only be used before the application is started.

remove(
  connection: Connection,
  roomId: string,
): Promise<void>

ArgumentTypeDescription
connection
Connection
Connection to remove the subscription from
roomId
string
Room identifier

Usage #

await app.subscription.remove(
  request.context.connection,
  "<unique Kuzzle room identifier>"
);