LiteBus
CatalogDispatch

Inbox Azure Service Bus Dispatch

  • ID: dispatch.inbox.azure-service-bus
  • Name: Inbox Azure Service Bus dispatch
  • Maturity: GA
  • Summary: Publish leased inbox envelopes to Azure Service Bus queues or topics via UseAzureServiceBusDispatch.

What It Does

The extension registers TransportInboxDispatchModule with AzureServiceBusTransportModule. DefaultDestination maps to queue or topic name; route maps to subject. Behavior follows the shared transport inbox dispatcher with Azure-specific ack semantics on the consumer side (ingress or remote workers).

Packages

PackageRole
LiteBus.Inbox.Dispatch.AzureServiceBusRegistration glue
LiteBus.Inbox.DispatchShared dispatcher
LiteBus.Transport.AzureServiceBusAzure SDK adapter

Requires

  • dispatch.transport-core
  • transport.azure-service-bus
  • durable-core.inbox

Invariants

  • One Azure Service Bus transport module per process.
  • Publish path uses Service Bus message properties for LiteBus headers.
  • Consumer reconnect uses exponential backoff in AzureServiceBusConsumer (transport layer).

Non-Goals

  • Does not manage Service Bus entity creation (application or infrastructure responsibility).
  • Does not consume messages (ingress axis for intake).

Public Surface

services.AddLiteBus(litebus =>
{
    litebus.AddAzureServiceBusTransport(new AzureServiceBusTransportOptions
    {
        ConnectionString = "<namespace-connection-string>",
        ClientId = "orders-dispatcher"
    });

    litebus.AddInbox(inbox =>
    {
        inbox.EnableInboxProcessor();
        inbox.UseAzureServiceBusDispatch(
            options =>
            {
                options.DefaultDestination = "commands";
                options.ResolveRoute = envelope => envelope.ContractName;
            });
    });
});
APIRole
InboxModuleBuilder.UseAzureServiceBusDispatch(Action<TransportInboxDispatcherOptions>)Registers inbox transport dispatcher that requires the root Azure Service Bus transport
TransportInboxDispatcher.DispatchAsync(InboxEnvelope, CancellationToken)Shared publish flow for inbox leases

AzureServiceBusTransportOptions:

PropertyDefaultRole
ConnectionStringrequiredService Bus namespace connection
ClientIdnullSDK client identifier
ConsumerErrorRetryInterval00:00:05Base delay for consumer restart
ConsumerErrorRetryMaxInterval00:01:00Max restart delay for repeated errors

Observability

SignalDetail
send {destination}Queue or topic name, subject route, message id, and messaging.system=servicebus
litebus.transport.circuit_breaker.*Broker tag azure_service_bus
litebus.inbox.processor.dispatch_durationFull dispatch including Service Bus send
process {destination}Ingress path only, not dispatch

Optional live-namespace tests in AzureServiceBusOptionalIntegrationTests when env vars are configured.

Deep Docs

Test Coverage

Covered

Test methodProject
InboxDispatchExtensions_ShouldRegisterTransportDispatcherLiteBus.Durable.IntegrationTests (Registration/)
ProcessPendingAsync_ShouldPublishLeasedEnvelopeToServiceBusQueueLiteBus.Durable.IntegrationTests (Dispatch/Inbox/AzureServiceBus/) (emulator)
ProcessPendingAsync_WithLiveConnection_ShouldPublishToAzureServiceBusQueueLiteBus.Durable.IntegrationTests (Ingress/AzureServiceBus/) (optional live namespace)

Untested

  • Dispatch failure path with unreachable namespace in dispatch-specific suite.
  • Circuit-breaker-open behavior for inbox Azure dispatch.
  • Tenant routing strategy override coverage.

Out-of-Scope

  • Service Bus entity creation and IAM (application or infrastructure)
  • Consuming messages (ingress.inbox.azure-service-bus)

On this page