Realtime events

This page contains all non-API events related to realtime actions in Kuzzle.


core:hotelClerk:addSubscription

This event is deprecated and will be removed in the next major version of Kuzzle.

Use core:realtime:user:subscribe:after instead.

Deprecated since 2.5.0
Arguments Type Description
subscription
object
Contains information about the added subscription

Triggered whenever a subscription is added.

subscription

The provided subscription object has the following properties:

Properties Type Description
roomId
string
Room unique identifier
connectionId
integer
ClientConnection unique identifier
index
string
Index
collection
string
Collection
filters
object
Filters in Koncorde's normalized format

core:hotelClerk:removeRoomForCustomer

This event is deprecated and will be removed in the next major version of Kuzzle.

Use core:realtime:user:unsubscribe:after instead.

Deprecated since 2.5.0
Arguments Type Description
RequestContest
object
requestContext object
room
object
Joined room information in Koncorde format

Triggered whenever a user is removed from a room.

room

The provided room object has the following properties:

Properties Type Description
id
string
Room unique identifier
index
string
Index
collection
string
Collection

core:realtime:room:create:after

Available since 2.5.0

Triggered whenever a new realtime room is subscribed (NOT triggered if a user subscribes to an existing room).

Pipes cannot listen to this event, only hooks can.

Arguments Type Description
room
object
Joined room information

room

The provided room object has the following properties:

Properties Type Description
index
string
Index name
collection
string
Collection name
roomId
string
The new room unique identifier

core:realtime:room:remove:before

Available since 2.5.0

Triggered whenever a realtime room is deleted, which happens when the last subscriber leaves it.

Pipes cannot listen to this event, only hooks can.

Arguments Type Description
roomId
string
Room unique identifier

core:realtime:user:subscribe:after

Triggered whenever a user makes a new subscription.

Available since 2.5.0
Arguments Type Description
subscription
object
Contains information about the added subscription

subscription

The provided subscription object has the following properties:

Properties Type Description
roomId
string
Room unique identifier
connectionId
integer
ClientConnection unique identifier
index
string
Index
collection
string
Collection
filters
object
Filters in Koncorde's normalized format

core:realtime:user:unsubscribe:after

Triggered whenever a user leaves a room.

Available since 2.5.0
Arguments Type Description
RequestContest
object
requestContext object
room
object
Joined room information in Koncorde format

room

The provided room object has the following properties:

Properties Type Description
id
string
Room unique identifier
index
string
Index
collection
string
Collection

notify:dispatch

Arguments Type Description
message Notification The normalized real-time notification

Triggered whenever a real-time notification is about to be sent.


notify:document

Arguments Type Description
message Notification The normalized real-time notification

Triggered whenever a real-time document notification is about to be sent.


notify:server

Arguments Type Description
message Notification The normalized real-time notification

Triggered whenever a real-time server notification is about to be sent.


notify:user

Arguments Type Description
message Notification The normalized real-time notification

Triggered whenever a real-time user notification is about to be sent.


room:new

This event is deprecated and will be removed in the next major version of Kuzzle.

Use core:realtime:room:create:after instead.

Deprecated since 2.5.0
Arguments Type Description
room
object
Joined room information

Triggered whenever a new subscription is created.

Pipes cannot listen to this event, only hooks can.

room

The provided room object has the following properties:

Properties Type Description
index
string
Index name
collection
string
Collection name
roomId
string
The new room unique identifier

room:remove

This event is deprecated and will be removed in the next major version of Kuzzle.

Use core:realtime:room:remove:before instead.

Deprecated since 2.5.0
Arguments Type Description
roomId
string
Room unique identifier

Triggered whenever a real-time subscription is cancelled.

Pipes cannot listen to this event, only hooks can.