RPC broker powered by Redis
Example
Extends
BaseRedisBroker<TEvents, TResponses>Implements
IRPCBroker<TEvents, TResponses>Constructs a new instance of the
RPCRedisBroker
className | Type | Optional | Description |
---|---|---|---|
redisClient | Redis | No | None |
options | RPCRedisBrokerOptions | No | None |
Whether this broker is currently polling events
Inherited from BaseRedisBrokerInherited from BaseRedisBroker
Used for Redis queues, see the 3rd argument taken by xadd
Inherited from BaseRedisBrokerInternal copy of the Redis client being used to read incoming payloads
Inherited from BaseRedisBrokerEvents this broker has subscribed to
Inherited from BaseRedisBrokerMakes an RPC call
Name | Constraints | Optional | Default | Description |
---|---|---|---|---|
Event | keyof TEvents | No | None |
Name | Type | Optional | Description |
---|---|---|---|
event | Event | No | None |
data | TEvents[Event] | No | None |
timeoutDuration | number | Yes | None |
Destroys the broker, closing all connections
Inherited from BaseRedisBrokerBegins polling for events, firing them to listen
Inherited from BaseRedisBrokerSubscribes to the given events
Name | Type | Optional | Description |
---|---|---|---|
events | (keyof TEvents)[] | No | None |
Unsubscribes from the given events
Name | Type | Optional | Description |
---|---|---|---|
events | (keyof TEvents)[] | No | None |