RabbitMQ message broker implementation using AMQP 0-9-1 topic exchange.
M70c: amqplib has no reconnect of any kind, so this broker runs the
ReconnectSupervisor in drive mode — on a connection
'error'/'close' event it reconnects, re-asserts the exchange, and
replays every active subscription. isReady() keeps its lifecycle meaning
(a reconnecting broker is still ready); reachability() reports the
fault window, which the health indicator maps to down.
Creates a new RabbitMQ broker.
serializer: ISerializer
Serializer for message payloads
options: RabbitMqOptions
RabbitMQ connection and configuration options
connect(): Promise<void>
Connects to RabbitMQ.
disconnect(): Promise<void>
Disconnects from RabbitMQ.
isHealthy(): Promise<boolean>
Boolean port member (M70c): false only when positively unreachable.
isReady(): boolean
Checks if the broker is connected (lifecycle — M70c).
true while connect() has run and disconnect() has not, even during
a reconnect window: the lifecycle is intact, the backend is what is
down. Reachability is isHealthy/reachability.
publish<T>(topic: string,message: T): Promise<void>
Publishes a message to a topic.
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>
Tri-state backend reachability (M70c).
false while the supervisor is in a fault window (the connection
dropped and the drive-mode reconnect has not yet succeeded); true
otherwise. This reads the fault flag directly — it is a zero-cost,
always-current value, so caching it (as the I/O probes do) would make the
signal stale exactly when it matters.
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.
subscribeWithHeaders<T>(): Promise<ISubscription>
Subscribes through the header-aware internal path. @internal