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

IMessageQueue.subscribe() method

Creates or uses subscription channel with the given name and sets message handler on data receive

Signature:

subscribe(channel: string, handler: (data: JsonObject) => any): Promise<void>;

Parameters

Parameter

Type

Description

channel

string

channel name

handler

(data: JsonObject) => any

Returns:

Promise<void>