Home > @imqueue/rpc > RedisQueue > publish

RedisQueue.publish() method

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

If toName specified will publish to PubSub with a 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>