# Service Bus

Azure Service Bus is a managed enterprise message broker that connects applications through durable queues and publish-subscribe topics.

Cloud service · Azure. Updated 2026-11-25. Page: https://blowstack.com/tools/cloud-services-hub/service-bus

> Service Bus decouples producers and consumers so applications can exchange business messages without being available at the same time or processing work at the same rate. It supports asynchronous commands, workload buffering, and event distribution, with capabilities for ordered processing, retries, transactions, and failed-message handling.

## 10 key features of Service Bus

1. **Durable queues and competing consumers**: Queues buffer work until consumers retrieve it, allowing producers and workers to scale independently. Run multiple consumer instances against the same queue to distribute processing without delivering every message to every instance.
2. **Topics, subscriptions, and filtering**: Topics distribute messages to independent subscriptions, each with its own processing backlog. Use correlation filters or SQL-style filters on message properties to route events to the appropriate consumers.
3. **Explicit message settlement**: Peek-Lock receivers complete, abandon, defer, or dead-letter messages according to processing outcomes. Renew locks when necessary and design handlers for redelivery rather than assuming exactly-once execution.
4. **Sessions for ordered processing**: Sessions provide exclusive, ordered handling of messages sharing a session identifier and can retain session state. Use an order ID or account ID as the session identifier when related operations must be handled sequentially.
5. **Duplicate detection**: The broker can discard repeated sends with the same MessageId within a configured detection window. This helps with ambiguous send outcomes, but consumers still need idempotency for redelivered messages.
6. **Dead-letter queues**: Queues and subscriptions have associated dead-letter subqueues for messages that cannot be processed successfully. Record meaningful failure reasons and build an operational process to inspect, correct, and selectively resubmit messages.
7. **Scheduling and deferral**: Scheduled messages become available at a specified future time. Deferral sets an already received message aside until the application retrieves it by sequence number, so the application must retain that identifier.
8. **Broker transactions and autoforwarding**: Supported messaging operations can be grouped into a Service Bus transaction, and autoforwarding can chain entities within the same namespace. These transactions do not automatically include external database updates; use an outbox or another consistency pattern for those changes.
9. **Identity and network controls**: Authorize clients with Microsoft Entra ID roles and managed identities, or use Shared Access Signatures where required. Premium private endpoints provide private connectivity, while Network Security Perimeter can centrally govern supported public-access paths.
10. **Premium geographic resilience**: Geo-Replication maintains replicas of namespace metadata and message data in secondary regions, including for partitioned Premium namespaces. Plan and test secondary promotion; forced promotion with asynchronous replication can cause message loss or duplication.

## Where Service Bus is used

1. **Background job processing**: An API queues document-generation or image-processing requests and returns before the work finishes. Worker instances consume jobs at a controlled rate, keeping expensive processing off the request path.
2. **Business event distribution**: Publish an OrderAccepted event to a topic with separate subscriptions for fulfillment, billing, and notifications. Each subsystem processes its own copy independently and can recover from an outage without blocking the others.
3. **Ordered entity workflows**: Assign the same session identifier to all updates for an individual order or account. A session-aware consumer processes those updates sequentially while other sessions are handled concurrently.
4. **Hybrid application integration**: On-premises applications and Azure workloads exchange messages through a shared namespace using outbound connectivity or an appropriate private network path. Durable queues allow either side to tolerate temporary disconnection.
5. **Load leveling for constrained systems**: Buffer requests before a database, partner API, or legacy application with limited throughput. Cap consumer concurrency to protect the downstream system and monitor message age to detect growing processing delays.
6. **Delayed business actions**: Schedule a payment reminder or an order-expiration check for a future time. Revalidate the current business state when the message is processed because scheduled delivery does not guarantee execution at an exact instant.

## How Service Bus is priced

- **Basic tier**: A shared-capacity, operation-based option for queue-only workloads, without a Standard-style base charge. It does not include topics and subscriptions or advanced capabilities such as sessions, transactions, and duplicate detection.
- **Standard tier**: Combines a base charge with metered messaging operations on shared infrastructure. It adds topics, subscriptions, and advanced messaging features; estimate costs from sends, receives, settlement operations, payload size, and the number of subscription copies.
- **Premium tier**: Uses allocated messaging units to provide dedicated processing and memory resources, with capacity-based billing rather than per-operation messaging charges. Size capacity through load testing, account for partitions and regional replicas, and include applicable replication, networking, and data-transfer charges.

## Services Service Bus works with

A common architecture places Service Bus between an API and background compute. The API validates a request and sends a small command message; Azure Functions or AKS workers retrieve it, update application state, and complete it only after successful processing. Managed identities authenticate the components through Microsoft Entra ID, with separate sender and receiver roles. Where database changes and message publication must remain consistent, use a transactional outbox rather than assuming a broker transaction covers both systems.

Topics extend this pattern to independent business consumers. Fulfillment workers, notification functions, and Logic Apps workflows can each maintain a subscription, with filters selecting relevant messages. Store large documents in Blob Storage and send references so broker payloads remain small. Align blob retention with retry and dead-letter recovery windows.

Operationally, combine Azure Monitor metrics with application telemetry to track backlog, processing latency, lock failures, and dead-letter growth. For private deployments, verify DNS resolution, compute outbound routing, and connector network support. Regional recovery plans should cover both the messaging namespace and its dependent compute, identity, storage, and downstream systems.

- **[Azure Functions](https://blowstack.com/tools/cloud-services-hub/azure-functions)**: Service Bus triggers start function executions for messages arriving on queues or topic subscriptions, and output bindings can send messages. For example, a function can process an invoice request and publish a completion event. Configure concurrency, lock renewal, and settlement behavior for the workload, and use managed identity with the required messaging roles.
- **[Logic Apps](https://blowstack.com/tools/cloud-services-hub/logic-apps)**: Logic Apps provides Service Bus connectors for message-driven integration workflows. For example, a workflow can receive an order message, call an ERP connector, and send a status message to another queue. Connector capabilities and network-access options differ between hosting models, so verify private connectivity and message-settlement behavior before deployment.
- **[Azure Kubernetes Service (AKS)](https://blowstack.com/tools/cloud-services-hub/azure-kubernetes-service-(aks))**: Applications running on AKS can use Service Bus SDKs to publish and consume messages. For example, fulfillment worker deployments can scale from queue backlog using KEDA. Use Microsoft Entra Workload ID for authentication and tune scaling, prefetch, and consumer concurrency to respect downstream capacity.
- **[Azure Blob Storage](https://blowstack.com/tools/cloud-services-hub/azure-blob-storage)**: Use the claim-check pattern to keep large payloads in Blob Storage and send a blob reference through Service Bus. For example, store an uploaded document in a private container and enqueue its blob identifier for extraction workers. Coordinate retention and cleanup so blobs remain available through message retries, and use identity-based access rather than long-lived embedded credentials.
- **[Azure Monitor](https://blowstack.com/tools/cloud-services-hub/azure-monitor)**: Azure Monitor collects Service Bus platform metrics and supports diagnostic settings for available resource logs. For example, alert when dead-lettered messages increase, throttled requests appear, or active-message counts remain elevated. Instrument application handlers separately to measure business processing latency and correlate failures with message identifiers.
- **[API Management](https://blowstack.com/tools/cloud-services-hub/api-management)**: Service Bus queues and topics can receive messages directly from an API Management policy. For example, an API can put an order request on a queue using a managed identity and return an acceptance response without waiting for fulfillment.
- **[App Service](https://blowstack.com/tools/cloud-services-hub/app-service)**: Service Bus can trigger App Service WebJobs when a message arrives on a queue or topic subscription. Service Connector can also configure an App Service application's namespace settings and authentication for sending or receiving messages.
- **[Azure Arc](https://blowstack.com/tools/cloud-services-hub/azure-arc)**: A network-restricted Service Bus namespace can allow eligible Azure Arc traffic through its trusted Microsoft services firewall exception without opening the namespace to general public traffic. The exception does not grant messaging permissions.
- **[Azure Container Apps](https://blowstack.com/tools/cloud-services-hub/azure-container-apps)**: Service Bus queue depth or a topic subscription's message backlog can drive scaling for a container app or trigger event-driven Container Apps jobs. For example, a worker app can scale out as orders accumulate and scale back to zero when the queue is empty.
- **[Azure Data Explorer](https://blowstack.com/tools/cloud-services-hub/azure-data-explorer)**: Service Bus recognizes Azure Data Explorer under its trusted Microsoft services firewall setting. A restricted namespace can allow eligible Azure Data Explorer traffic while still requiring authorization for messaging operations.
- **[Azure DevOps](https://blowstack.com/tools/cloud-services-hub/azure-devops)**: Service Bus queues and topics can receive Azure DevOps service hook notifications. For example, a queue can hold build-completion events until a deployment worker is ready to process them.
- **[Azure Digital Twins](https://blowstack.com/tools/cloud-services-hub/azure-digital-twins)**: Service Bus topics can receive events from Azure Digital Twins through a configured endpoint and event route. For example, a route can publish equipment state changes to a topic so maintenance and reporting consumers can each receive a copy.
- **[Azure DNS](https://blowstack.com/tools/cloud-services-hub/azure-dns)**: A Service Bus private endpoint can use an Azure Private DNS zone named `privatelink.servicebus.windows.net`. Clients on linked virtual networks can then resolve the usual namespace hostname to the private endpoint's IP address.
- **[Azure ExpressRoute](https://blowstack.com/tools/cloud-services-hub/azure-expressroute)**: Clients on premises can reach a Service Bus namespace through its private endpoint over ExpressRoute private peering. This lets them use the namespace with public network access disabled.
- **[Azure Firewall](https://blowstack.com/tools/cloud-services-hub/azure-firewall)**: Azure Firewall network rules can use the `ServiceBus` service tag to permit outbound traffic to public Service Bus endpoints without maintaining the service's IP ranges by hand. Service Bus still authenticates each client and enforces its messaging permissions.
- **[Azure Health Data Services](https://blowstack.com/tools/cloud-services-hub/azure-health-data-services)**: A Service Bus namespace with network restrictions can allow eligible Azure Health Data Services traffic through its trusted Microsoft services firewall exception. The namespace still requires the calling identity to be authorized.
- **[Azure IoT Central](https://blowstack.com/tools/cloud-services-hub/azure-iot-central)**: Service Bus queues and topics can receive data from a configured IoT Central export. For example, IoT Central can send device events to a topic using its managed identity so separate consumers can handle maintenance and reporting.
- **[Azure IoT Hub](https://blowstack.com/tools/cloud-services-hub/azure-iot-hub)**: Service Bus queues and topics are supported custom endpoints for IoT Hub message routing. For example, a routing rule can send device alarm messages to a Service Bus queue for a maintenance worker.
- **[Azure Key Vault](https://blowstack.com/tools/cloud-services-hub/azure-key-vault)**: A Premium Service Bus namespace can use a customer-managed key stored in Azure Key Vault to protect its data at rest. The namespace uses its managed identity to access the key.
- **[Azure Machine Learning](https://blowstack.com/tools/cloud-services-hub/azure-machine-learning)**: Service Bus can permit eligible Azure Machine Learning traffic through the trusted Microsoft services firewall exception on a restricted namespace. The exception affects network access only; it does not grant send or receive permissions.
- **[Azure Policy](https://blowstack.com/tools/cloud-services-hub/azure-policy)**: Built-in Azure Policy definitions can audit or enforce Service Bus namespace settings, such as disabling public network access or local authentication. This lets administrators apply the same messaging security requirements across subscriptions.
- **[Azure portal](https://blowstack.com/tools/cloud-services-hub/azure-portal)**: The Azure portal can provision and configure Service Bus namespaces, queues, topics, and subscriptions. Its built-in Service Bus Explorer can send a test message or peek at messages in a queue or dead-letter queue.
- **[Azure Private Link](https://blowstack.com/tools/cloud-services-hub/azure-private-link)**: A Premium Service Bus namespace can expose a private endpoint in a virtual network through Azure Private Link. Clients can use that endpoint to send and receive messages even when public network access is disabled.
- **[Azure Resource Manager](https://blowstack.com/tools/cloud-services-hub/azure-resource-manager)**: Azure Resource Manager exposes Service Bus namespaces, queues, topics, subscriptions, rules, and other settings as deployable resource types. A template can create a namespace and its messaging entities together, including subscription filters.
- **[Azure role-based access control (Azure RBAC)](https://blowstack.com/tools/cloud-services-hub/azure-role-based-access-control-(azure-rbac))**: Service Bus uses Azure RBAC to authorize management and messaging operations. For example, the Azure Service Bus Data Sender role can let a managed identity send messages to a single queue without giving it permission to receive them.
- **[Azure Service Health](https://blowstack.com/tools/cloud-services-hub/azure-service-health)**: Service Health reports Azure incidents and planned maintenance that affect Service Bus. Its Resource Health view also shows the reported availability of individual Service Bus namespaces.
- **[Azure Spring Apps](https://blowstack.com/tools/cloud-services-hub/azure-spring-apps)**: Service Connector can configure a Spring Apps application with the namespace and authentication settings it needs to use Service Bus. Spring Cloud Azure can then map application message producers and consumers to Service Bus queues or topics.
- **[Azure SQL Database](https://blowstack.com/tools/cloud-services-hub/azure-sql-database)**: Service Bus can accept messages from Azure SQL Database through the supported Service Bus REST endpoint and the built-in `sp_invoke_external_rest_endpoint` procedure. For example, a stored procedure can submit a notification to a queue using Microsoft Entra authentication.
- **[Azure SQL Managed Instance](https://blowstack.com/tools/cloud-services-hub/azure-sql-managed-instance)**: Service Bus can receive messages from an Azure SQL Managed Instance that supports `sp_invoke_external_rest_endpoint`. The procedure can call the Service Bus REST endpoint to publish a message from a SQL workflow.
- **[Azure Stream Analytics](https://blowstack.com/tools/cloud-services-hub/azure-stream-analytics)**: Service Bus queues and topics are native output destinations for Stream Analytics jobs. A streaming query can send an alert to a queue when a reading crosses a threshold, or publish it to a topic for multiple consumers.
- **[Azure Synapse Analytics](https://blowstack.com/tools/cloud-services-hub/azure-synapse-analytics)**: Service Bus supports connections authenticated with a Synapse workspace's managed identity. A restricted namespace can allow eligible Synapse traffic through its trusted services exception, with an Azure RBAC role controlling whether the workspace can send or receive messages.
- **[Azure Virtual Machine Scale Sets](https://blowstack.com/tools/cloud-services-hub/azure-virtual-machine-scale-sets)**: A virtual machine scale set can use a Service Bus queue's message count as an autoscale metric. For example, it can add worker instances when the backlog grows and remove them as the workers catch up.
- **[Azure Virtual Network](https://blowstack.com/tools/cloud-services-hub/azure-virtual-network)**: A Premium Service Bus namespace can restrict access to selected Azure Virtual Network subnets through virtual network service endpoints. Workloads in an authorized subnet can use the namespace's regular hostname even though the namespace rejects traffic from networks that are not allowed.
- **[Event Grid](https://blowstack.com/tools/cloud-services-hub/event-grid)**: Service Bus can publish events to Event Grid when messages are available and no receiver is active. In the other direction, Event Grid can deliver subscribed events to Service Bus queues or topics so consumers can process them asynchronously.
- **[Event Hubs](https://blowstack.com/tools/cloud-services-hub/event-hubs)**: Service Bus diagnostic settings can stream namespace resource logs and supported metrics to Event Hubs. A central monitoring pipeline can consume that stream without reading the application messages held in Service Bus queues or topics.
- **[Microsoft Defender for Cloud](https://blowstack.com/tools/cloud-services-hub/microsoft-defender-for-cloud)**: Defender for Cloud can surface security recommendations for Service Bus namespaces, such as restricting network access. Service Bus also recognizes eligible Defender for Cloud traffic under its trusted Microsoft services firewall setting.
- **[Microsoft Entra ID (formerly Azure AD)](https://blowstack.com/tools/cloud-services-hub/microsoft-entra-id-(formerly-azure-ad))**: Service Bus accepts Microsoft Entra access tokens from authorized users, service principals, and managed identities. For example, a worker can receive queue messages using its managed identity instead of storing a shared access key.
- **[Microsoft Purview](https://blowstack.com/tools/cloud-services-hub/microsoft-purview)**: A restricted Service Bus namespace can admit eligible Microsoft Purview traffic through the trusted Microsoft services firewall exception. The exception does not grant Purview permission to send or receive messages.

## Alternatives to Service Bus in other clouds

### AWS

**[Amazon MQ](https://blowstack.com/tools/cloud-services-hub/amazon-mq)**: Amazon MQ and Azure Service Bus are managed message brokers that let applications communicate asynchronously through queues and publish-subscribe topics. Amazon MQ runs ActiveMQ or RabbitMQ broker instances and bills for instance time and storage, while Azure Service Bus offers shared or dedicated capacity and bills for messaging operations or allocated capacity, depending on the tier.

| | Service Bus | Amazon MQ |
| --- | --- | --- |
| Deployment model | Shared or dedicated namespace capacity | ActiveMQ or RabbitMQ broker instances |
| Main billing basis | Operations or capacity, by tier | Broker instance time and storage |
| Cross-region message replication | Premium namespace replicas | ActiveMQ primary and replica brokers |

Compared Nov 2026.

**[Amazon Simple Notification Service (Amazon SNS)](https://blowstack.com/tools/cloud-services-hub/amazon-simple-notification-service-(amazon-sns))**: Amazon SNS and Azure Service Bus both offer managed publish-subscribe messaging to decouple distributed applications. Amazon SNS pushes messages to subscriber endpoints and can filter on message attributes or payloads, while Azure Service Bus receivers retrieve messages from subscription backlogs and subscription filters evaluate message properties only.

| | Service Bus | Amazon Simple Notification Service (Amazon SNS) |
| --- | --- | --- |
| Topic delivery | Receivers pull from subscriptions | Push to subscriber endpoints |
| Topic billing | Standard: base + usage; Premium: units | Usage-based, no base charge |
| Subscription filters | Message properties only | Message attributes or payload |
| Ordered processing | Sessions keyed by session ID | FIFO topics to SQS FIFO queues |

Compared Nov 2026.

**[Amazon Simple Queue Service (Amazon SQS)](https://blowstack.com/tools/cloud-services-hub/amazon-simple-queue-service-(amazon-sqs))**: Amazon SQS and Azure Service Bus provide managed queues that let applications exchange messages asynchronously. Amazon SQS meters API requests and uses FIFO queues for ordered processing, while Azure Service Bus meters operations or bills for dedicated capacity depending on the tier and uses sessions to order related messages.

| | Service Bus | Amazon Simple Queue Service (Amazon SQS) |
| --- | --- | --- |
| Billing model | Operations, base + ops, or capacity | Per billable API request |
| Ordered processing | Sessions on Standard or Premium | FIFO queues |
| What happens on receipt | Peek-Lock or Receive-and-Delete | Message hidden; delete after processing |
| Delayed delivery | Scheduled for a future time | Relative delay up to 15 minutes |

Compared Nov 2026.

## What is Service Bus

Azure Service Bus provides durable asynchronous messaging for distributed applications, microservices, and hybrid systems. Applications send messages to entities within a namespace, and receivers retrieve them when they have capacity to process them. This separates application availability from downstream processing availability and lets a queue absorb temporary traffic spikes. Service Bus is intended for business messaging rather than analytical event streaming or long-term message archiving.

A queue distributes work among competing consumers. Each message is processed by one consumer at a time, although it can be delivered again after a processing or settlement failure. A topic supports publish-subscribe messaging through independent subscriptions. Each subscription receives matching messages and maintains its own backlog. Subscription filters evaluate message properties, not message bodies, so producers should place routing attributes such as event type, tenant identifier, or business region in application properties.

Use Peek-Lock receive mode when messages must survive consumer failures. The receiver temporarily locks a message, performs its work, and completes the message after successful processing. Abandoning the message or allowing its lock to expire makes it eligible for redelivery. Configure lock renewal for longer-running handlers, and make business operations idempotent because successful processing followed by a failed completion can cause duplicate execution. Receive-and-Delete removes messages as they are delivered and is appropriate only when message loss is acceptable.

Sessions support ordered handling of related messages using a shared session identifier. Ordering applies within a session rather than globally across all consumers. Duplicate detection suppresses repeated sends with the same message identifier within a configured window, but it does not provide end-to-end exactly-once processing. Dead-letter queues isolate messages that exceed delivery attempts or are explicitly rejected. Applications need monitoring, inspection, and controlled replay procedures because dead-lettered messages are not automatically repaired or reprocessed.

Choose Basic for straightforward queue workloads, Standard for shared-capacity messaging with topics and advanced broker features, and Premium when dedicated resources or Premium-specific networking and resilience capabilities are required. Check message-size, entity-capacity, connection, and throughput quotas before deployment. Reuse SDK clients and connections, batch sends where appropriate, and tune prefetch and concurrency against processing duration so prefetched messages do not exhaust their locks before handling begins.

Prefer Microsoft Entra ID authentication with managed identities and narrowly scoped data-plane roles. Premium supports private endpoints for private network access; private DNS and application routing must also be configured. For regional recovery, Premium Geo-Replication replicates message data and metadata and supports partitioned namespaces. Do not confuse it with Geo-Disaster Recovery, which replicates entity metadata only. Test promotion and client recovery procedures, and select replication settings according to acceptable data loss and latency. Monitor backlog growth, dead-letter counts, throttling, and application processing latency as part of normal operations.
