Redis Streams message broker implementation.
Uses Redis Streams for persistent message delivery with consumer groups for load-balanced processing.
Creates a new Redis Streams broker.
serializer: ISerializer
Serializer for message payloads
options: RedisStreamsOptions
Redis connection and polling options
connect(): Promise<void>
Connects the broker to Redis.
disconnect(): Promise<void>
Disconnects the broker and clears all subscriptions.
isHealthy(): Promise<boolean>
Boolean port member (M70c): false only when positively unreachable.
isReady(): boolean
Checks if the broker is connected.
publish<T>(topic: string,message: T): Promise<void>
Publishes a message to a topic (Redis stream).
publishWithHeaders<T>(topic: string,message: T,headers: Readonly<Record<string, string>>): Promise<void>
Publishes a message with framework-owned transport headers. @internal
reachability(): Promise<boolean | undefined>
Tri-state backend reachability (M70c).
ioredis auto-reconnects via its default retry strategy, so the broker
does not run a reconnect loop of its own; the truth is what ping()
reports right now. true when ping() resolves, false when it
rejects (the server is down or the socket is mid-reconnect), undefined
when the injected client exposes no ping (a minimal fake) — in which
case the indicator reports reachable: 'unknown' rather than lying.
request<TReq, TRes>(): Promise<TRes>
Sends a request and awaits a single correlated reply.
requestWithHeaders<TReq, TRes>(): Promise<TRes>
Sends request-reply traffic with framework-owned headers. @internal
respond<TReq, TRes>(): Promise<ISubscription>
Registers a responder whose result is returned to the requesting caller.
subscribe<T>(): Promise<ISubscription>
Subscribes to a topic using Redis Streams consumer groups.
subscribeWithHeaders<T>(): Promise<ISubscription>
Subscribes through the header-aware internal path. @internal