Setu-TS
    Preparing search index...

    Class ServiceBusBroker

    Azure Service Bus message broker.

    0.1.0

    Implements

    • MessageBrokerAdapter
    Index
    • Boolean port member (M70c): false only when positively unreachable.

      Returns Promise<boolean>

      true when reachable or unprobeable, false when the transport reports unreachable

      0.1.0

    • Publishes a message to a topic.

      Type Parameters

      • T

        The payload type

      Parameters

      • topic: string

        Destination topic

      • message: T

        The payload (serialized by the broker adapter)

      • Optionaloptions: PublishOptions

        Ordering, de-duplication and header options; an option the broker has no native primitive for is carried as a transport header

      Returns Promise<void>

    • Internal

      Publishes a message with framework-owned transport headers.

      Type Parameters

      • T

      Parameters

      • topic: string
      • message: T
      • headers: Readonly<Record<string, string>>
      • Optionaloptions: PublishOptions

      Returns Promise<void>

    • Tri-state backend reachability (M70c, bounded in M90b; evidence-first in M95b; a negative outcome answers at once in M101a).

      The evidence is consulted FIRST: a data-plane outcome — the success or network-layer failure of a real publish, recorded in ServiceBusBroker.publishWithHeaders at zero extra round trips — answers directly, because the thing reported on should be the plane the application actually uses. Positive evidence expires after ServiceBusOptions.dataPlaneEvidenceMs; negative evidence is retained until contradicted.

      A retained negative outcome returns false WITHOUT waiting for the management probe (V8-1): the probe is started in the background, and only when it settles true does it clear the outcome — so the NEXT read, not this one, answers through the probe again. Awaiting it here was a race the caller lost: the messaging indicator bounds this call with the same 2 s the probe is bounded with, so a probe that could not reach the namespace timed the indicator out first and the indicator reported up.

      With no authoritative evidence the management probe answers exactly as it did before M95b: the probe delegates to the transport's isHealthy?() — the real adapter reads the namespace through the administration client — through the broker's own cached probe (5 s TTL, 2 s bound), so repeated health polls cost at most one round trip per TTL and a hung transport cannot hold a caller past the bound. true/false from the evidence or the probe, undefined when neither has an answer (a minimal fake, an idle broker) — the indicator then reports reachable: 'unknown'.

      Returns Promise<boolean | undefined>

      true/false/undefined as described

      0.1.0

    • Sends a request to a topic and awaits a single correlated reply, providing brokered request-reply (RPC) over the message broker.

      A responder registered with respond on the same topic returns the reply. The call rejects with a RequestTimeoutError when no reply arrives within options.timeoutMs, and with a RemoteHandlerError when the responder throws.

      Request traffic rides a channel derived from topic, disjoint from plain publish/subscribe on that same topic — a pub/sub consumer never observes an RPC request, and vice versa.

      Type Parameters

      • TReq

        The request payload type

      • TRes

        The reply payload type

      Parameters

      • topic: string

        Destination topic the responder is listening on

      • message: TReq

        The request payload (serialized by the broker adapter)

      • Optionaloptions: RequestOptions

        Reply timeout behavior

      Returns Promise<TRes>

      The reply payload