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.

broadcast (event: string, payload: JSONObject): Promise<void>

ArgumentTypeDescription
event
string
Event name
payload
JSONObject
Event payload

Usage #

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