IMessageQueue.publish() method
Publishes data to current queue channel
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. Different name should be in the same namespace (same imq prefix)
Signature:
publish(data: JsonObject, toName?: string): Promise<void>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
data |
data to publish as channel message | |
|
toName |
string |
(Optional) different name of the pubsub to publish to {Promise |
Returns:
Promise<void>