Core Events #

Kuzzle triggers many core:* events for its internal use. Only events listed here should be used.

Use non-documented events at your own risk, we may remove them or change the payload without warning.

core:auth:strategyAdded #

ArgumentsTypeDescription
strategy
object
Authentication strategy information

Triggered whenever a plugin dynamically registers an authentication strategy.


strategy #

The provided strategy object has the following properties:

PropertiesTypeDescription
pluginName
string
The plugin's name defined in the manifest file
name
string
Authentication strategy name
strategy
object
Authentication strategy properties

core:auth:strategyRemoved #

ArgumentsTypeDescription
strategy
object
Authentication strategy information

Triggered whenever a plugin dynamically removes an authentication strategy.


strategy #

The provided strategy object has the following properties:

PropertiesTypeDescription
pluginName
string
The plugin's name defined in the manifest file
name
string
Authentication strategy name

core:kuzzleStart #

Deprecated since 2.2.0

This event is deprecated, and may be removed in a future version of Kuzzle. Use kuzzle:state:ready instead (its first replacement, kuzzle:start, is itself deprecated since 2.3.0).

Triggered when Kuzzle has finished booting and is ready to process user requests.

Pipes cannot listen to that event, only hooks can.

core:overload #

ArgumentsTypeDescription
fill
number
Request buffer fill percentage

Triggered when the requests buffer fills up more quickly than requests can be processed.

The requests buffer is configurable through the limits parameters in the Kuzzle configuration.

Requests submitted while the request buffer is completely filled (i.e. the payload is equal to 100) are rejected with a ServiceUnavailableError (code 503)

Pipes cannot listen to that event, only hooks can.

log:error #

ArgumentsTypeDescription
error
ServiceUnavailableError
The overload error

Triggered when a request is rejected because the requests buffer is full (see core:overload).

Pipes cannot listen to that event, only hooks can.

core:storage:collection:reindex:start #

Available since 2.62.0
ArgumentsTypeDescription
payload
object
The collection and the reindex task it started

Triggered when a mapping update starts a background reindex of a collection's documents, with the storage engine's id of that task: a collection:update with reindexCollection, or a change the engine can only apply to existing documents by reindexing them, such as dynamic.

The event is emitted on the node that ran the update, before the API request that started it is answered. The reindex itself is still running: follow it with the storage engine's task API.

Only storage drivers telling the task's id trigger it: with a driver that does not, the reindex still runs, but the event is not emitted. The API response does not change.

payload #

PropertiesTypeDescription
scope
string
public for the API's indexes, private for Kuzzle's internal ones
index
string
Index name
collection
string
Collection name
taskId
string
The storage engine's id of the reindex task (e.g. nodeId:1234)
app.hook.register(
  "core:storage:collection:reindex:start",
  ({ scope, index, collection, taskId }) => {
    // e.g. GET _tasks/<taskId> to follow it
  },
);

Pipes cannot listen to that event, only hooks can.

core:shutdown #

Deprecated since 2.2.0

This event is deprecated and is now an alias for kuzzle:shutdown.

It will be removed in a future version.