declare abstract class BaseRedisBroker<TEvents extends Record<string, any>> extends AsyncEventEmitter<ToEventMap<TEvents>> implements IBaseBroker<TEvents>
Helper class with shared Redis logic
Constructors
options: RedisBrokerOptions)
constructor(options: RedisBrokerOptions
Constructs a new instance of the BaseRedisBroker
class
Type Parameters
Record<string, any> TEvents extends
protectedboolean listening :
Whether this broker is currently polling events
protectedreadonlyRequired<RedisBrokerOptions> options :
Options this broker is using
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
protectedreadonlySet<string> subscribedEvents :
Events this broker has subscribed to
destroyPromise<void> () :
Destroys the broker, closing all connections
Handles an incoming Redis event
Subscribes to the given events, grouping them by the given group name