RPC broker powered by Redis
Example
Extends
BaseRedisBroker<TEvents>Implements
IRPCBroker<TEvents, TResponses>Constructs a new instance of the
RPCRedisBroker class| Name | Type | Optional | Description |
|---|---|---|---|
| options | RPCRedisBrokerOptions | No | None |
Whether this broker is currently polling events
Inherited from BaseRedisBrokerUsed 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 |
|---|---|---|---|---|
| T | keyof TEvents | No | None |
| Name | Type | Optional | Description |
|---|---|---|---|
| event | T | No | None |
| data | TEvents[T] | No | None |
| timeoutDuration | number | Yes | None |
Destroys the broker, closing all connections
Inherited from BaseRedisBroker| Name | Type | Optional | Description |
|---|---|---|---|
| id | Buffer | No | None |
| group | string | No | None |
| event | string | No | None |
| data | unknown | No | None |
Begins polling for events, firing them to listen
| Name | Type | Optional | Description |
|---|---|---|---|
| group | string | No | None |
Subscribes to the given events, grouping them by the given group name
| Name | Type | Optional | Description |
|---|---|---|---|
| group | string | No | None |
| events | (keyof TEvents)[] | No | None |
Unsubscribes from the given events - it's required to pass the same group name as when subscribing for proper cleanup
| Name | Type | Optional | Description |
|---|---|---|---|
| group | string | No | None |
| events | (keyof TEvents)[] | No | None |