interface IServiceBusTransport

Domain port for Azure Service Bus operations.

Methods

send(
topic: string,
body: string,
applicationProperties?: Readonly<Record<string, string>>
): Promise<void>

Send a body to a topic.

open(
topic: string,
subscription: string,
onMessage: (msg: { payload: string; ack: () => void; nack: () => void; applicationProperties?: Readonly<Record<string, string>>; messageId?: string; timestamp?: Date; }) => void | Promise<void>
): Promise<IServiceBusSubscription>

Open a receiver on a topic subscription.

createSubscription(
topic: string,
subscription: string
): Promise<void>

Create a subscription (for RPC inbox).

deleteSubscription(
topic: string,
subscription: string
): Promise<void>

Delete a subscription (for RPC inbox teardown).

close(): Promise<void>

Close the client and all senders/receivers.

optional
isHealthy(): Promise<boolean | undefined>

Reports whether the Service Bus namespace is reachable (optional, M70c).

The real adapter peeks the namespace via its existing client; a transport without a liveness check omits it and the broker reports unknown reachability. The SDK owns streaming-pull reconnection, so the broker issues no reconnect loop of its own.

Resolving undefined means could not determine — the probe itself failed rather than the namespace answering (V5-2). Widened from Promise<boolean> in 0.5.1; an implementation that still resolves a plain boolean satisfies it unchanged.

Usage

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