method NatsBroker.prototype.reachability
Since 0.1.0
NatsBroker.prototype.reachability(): Promise<boolean | undefined>

Tri-state backend reachability (M70c).

nats reconnects itself, so the broker runs the supervisor in observe mode: Disconnect/Reconnect events mark the fault window, and the probe is isClosed() === false and rtt() resolving. true when both hold, false when the window is active or the connection reports closed, undefined when the injected client exposes neither member (a minimal fake) — the indicator then reports reachable: 'unknown'.

Return Type

Promise<boolean | undefined>

true/false/undefined as described

Usage

import { NatsBroker } from "messaging-plugin/src/index.ts";