Home > @imqueue/core > RedisQueue > subscribe
RedisQueue.subscribe() method
Creates a subscription channel over redis and sets up channel data read handler
Signature:
subscribe(channel: string, handler: (data: JsonObject) => void): Promise<void>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
channel |
string | |
|
handler |
(data: JsonObject) => void |
Returns:
Promise<void>
{Promise