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 #
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 #
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.
Pipes cannot listen to this event, only hooks can.
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 |
kuid | string | ID of the user Available since 2.14.1 |
core:realtime:user:unsubscribe:after #
Triggered whenever a user leaves a room.
Pipes cannot listen to this event, only hooks can.
Arguments | Type | Description |
---|---|---|
RequestContest | object | RequestContext object Deprecated since 2.14.1 |
room | object | Joined room information in Koncorde format Deprecated since 2.14.1 |
subscription | object | Contains information about the removed subscription Available since 2.14.1 |
room #
The provided room
object has the following properties:
Properties | Type | Description |
---|---|---|
id | string | Room unique identifier |
index | string | Index |
collection | string | Collection |
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 |
kuid | string | ID of the user |
core:realtime:notification:dispatch:before #
Arguments | Type | Description |
---|---|---|
notificationContext | object | Contains information about the notification |
notificationContext #
Arguments | Type | Description |
---|---|---|
notification | Notifications | The normalized real-time notification |
channels | string[] | List of Subscribers channels to notify |
connectionId | integer | ClientConnection unique identifier |
notify:dispatch #
Deprecated since 2.19.1
This event is deprecated and will be removed in the next major version of Kuzzle.
Use core:realtime:notification:dispatch:before
instead.
Arguments | Type | Description |
---|---|---|
message | Notifications | The normalized real-time notification |
Triggered whenever a real-time notification is about to be sent.
notify:document #
Arguments | Type | Description |
---|---|---|
message | Notifications | The normalized real-time notification |
Triggered whenever a real-time document notification is about to be sent.
notify:server #
Arguments | Type | Description |
---|---|---|
message | Notifications | The normalized real-time notification |
Triggered whenever a real-time server notification is about to be sent.
notify:user #
Arguments | Type | Description |
---|---|---|
message | Notifications | 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.