Core
Framework v2.x
2

broadcast() #

Available since 2.9.0

Broadcasts an event and its payload to other cluster nodes.

This function returns once the event has been emitted.

Copied to clipboard!
broadcast (event: string, payload: JSONObject): Promise<void>

Argument Type Description
event
string
Event name
payload
JSONObject
Event payload

Usage #

Copied to clipboard!
await app.cluster.broadcast('some:event', { payload: 'information' })