RedisSubscriber
@rotorsoft/act-root / act-notify / RedisSubscriber
Type Alias: RedisSubscriber
RedisSubscriber =
object
Defined in: libs/act-notify/src/redis.ts:20
A node-redis(v4+)-shaped client in subscriber mode.
Methodsโ
subscribe()โ
subscribe(
channel,listener):Promise<unknown>
Defined in: libs/act-notify/src/redis.ts:21
Parametersโ
channelโ
string
listenerโ
(message) => void
Returnsโ
Promise<unknown>
unsubscribe()โ
unsubscribe(
channel,listener?):Promise<unknown>
Defined in: libs/act-notify/src/redis.ts:31
node-redis v4: with a listener argument, removes only that listener;
without it, removes every listener on the channel. The broker always
passes the specific listener so co-subscribers on a shared client survive
one subscriber's dispose (#1279).
Parametersโ
channelโ
string
listener?โ
(message) => void
Returnsโ
Promise<unknown>