class BaseRedisBroker
implements
IBaseBroker<TEvents>extends
AsyncEventEmitter<ToEventMap<TEvents, TResponses>>abstract
export declare abstract class BaseRedisBroker<TEvents extends Record<string, any[]>, TResponses extends Record<keyof TEvents, any> | undefined = undefined> extends AsyncEventEmitter<ToEventMap<TEvents, TResponses>> implements IBaseBroker<TEvents>
Helper class with shared Redis logic
Constructors
redisClient: Redisoptions: RedisBrokerOptions)
constructor(redisClient: Redis
options: RedisBrokerOptions
Constructs a new instance of the BaseRedisBroker
class
Type Parameters
protectedboolean listening :
Whether this broker is currently polling events
protectedreadonlyRequired<RedisBrokerOptions> options :
Options this broker is using
protectedreadonlyRedis redisClient :
Used for Redis queues, see the 3rd argument taken by xadd
protectedreadonlyRedis streamReadClient :
Internal copy of the Redis client being used to read incoming payloads
Handles an incoming Redis event