Carries frames over whatever broker is registered under
CAPABILITIES.MESSAGING.
This reuses every broker the messaging plugin already ships — in-memory,
Redis Streams, RabbitMQ, NATS, Kafka — and adds no dependency of its own.
The broker's own connect/disconnect are left to its owning plugin; this
transport only publishes and subscribes.
handlerErrors: readonly Error[]
Errors thrown by subscribers during delivery, oldest first.
isHealthy: () => Promise<boolean>
M70c: delegates to the resolved broker's isHealthy?() — the only way the
backplane can report the broker's reachability without importing the
messaging plugin (§3.1). Assigned only when the broker provides the
member: a broker that omits it is unknown, and the indicator reads
absence of isHealthy (not false) as that.
M90b (X21-1): the delegation calls through the OWNER —
broker.isHealthy(), not a detached const probe = broker.isHealthy
reference. A broker whose isHealthy reads instance state
(ServiceBusBroker's private probe cache, among others) throws a bare
TypeError when invoked unbound, which a health endpoint then reports
as an error rather than a fact. It retains the resolved broker's own
probe cache rather than adding a duplicate backplane-level cache.
origin: string
This instance's identity, stamped onto every frame it publishes.
Stable for the lifetime of the instance and distinct from every peer's.
close(): Promise<void>
Closes the underlying transport and drops every handler.
connect(): Promise<void>
Opens the underlying transport. Idempotent.
publish(frame: RealtimeFrame): Promise<void>
Publishes a frame to every other subscribed instance.
The frame is not delivered back to this instance's own handlers — a local broadcast has already reached local members directly, and redelivering it would double-send.
subscribe(handler: RealtimeFrameHandler): Promise<() => void>
Registers a handler for frames arriving from other instances.
May be called more than once; each consumer plugin registers its own.