You're viewing archived documentation for @imqueue/core v1.15.0. APIs may differ from the current release. View the latest version ↗

RedisQueue.publish() method

Publishes a message to this queue subscription channel for currently subscribed clients.

If toName specified will publish to pubsub with different name. This can be used to implement broadcasting some messages to other subscribers on other pubsub channels.

Signature:

publish(data: JsonObject, toName?: string): Promise<void>;

Parameters

Parameter

Type

Description

data

JsonObject

toName

string

(Optional)

Returns:

Promise<void>