Skip to content

Commit 3c0fb4f

Browse files
Merge pull request #296788 from spelluru/freshness0321
Freshness 2 03/21
2 parents 23b2424 + c62da89 commit 3c0fb4f

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

articles/service-bus-messaging/message-transfers-locks-settlement.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: Azure Service Bus message transfers, locks, and settlement
2+
title: Message transfers, locks, and settlement
33
description: This article provides an overview of Azure Service Bus message transfers, locks, and settlement operations.
44
ms.topic: article
5-
ms.date: 02/22/2024
5+
ms.date: 03/21/2025
66
ms.devlang: csharp
77
ms.custom: devx-track-csharp
88
---
99

1010
# Message transfers, locks, and settlement
1111

12-
The central capability of a message broker such as Service Bus is to accept messages into a queue or topic and hold them available for later retrieval. *Send* is the term that is commonly used for the transfer of a message into the message broker. *Receive* is the term commonly used for the transfer of a message to a retrieving client.
12+
The central capability of a message broker such as Service Bus is to accept messages into a queue or topic and hold them available for later retrieval. The term *send* is used to describe the process of transferring a message to the message broker, while *receive* refers to the process of retrieving a message from the broker.
1313

1414
When a client sends a message, it usually wants to know whether the message is properly transferred to and accepted by the broker or whether some sort of error occurred. This positive or negative acknowledgment settles the understanding of both the client and broker about the transfer state of the message. Therefore, it's referred to as a *settlement*.
1515

@@ -124,7 +124,7 @@ The typical mechanism for identifying duplicate message deliveries is by checkin
124124
> * Changing properties on the entity (Queue, Topic, Subscription) while holding the lock.
125125
> * If the Service Bus Client application loses its connection to the Service Bus for any reason.
126126
>
127-
> When the lock is lost, Azure Service Bus will generate a MessageLockLostException or SessionLockLostException, which will surface in the client application. In this case, the client's default retry logic should automatically kick in and retry the operation. Moreover, the delivery count of the message will not be incremented.
127+
> When the lock is lost, Azure Service Bus generates a MessageLockLostException or SessionLockLostException, which surfaces in the client application. In this case, the client's default retry logic should automatically kick in and retry the operation. Moreover, the delivery count of the message isn't incremented.
128128
129129
## Renew locks
130130
The default value for the lock duration is **1 minute**. You can specify a different value for the lock duration at the [queue](/dotnet/api/azure.messaging.servicebus.administration.createqueueoptions.lockduration) or [subscription](/dotnet/api/azure.messaging.servicebus.administration.createsubscriptionoptions.lockduration) level. The client owning the lock can renew the message lock by using methods on the receiver object. Instead, you can use the automatic lock-renewal feature where you can specify the time duration for which you want to keep getting the lock renewed.

articles/service-bus-messaging/service-bus-authentication-and-authorization.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Azure Service Bus authentication and authorization
33
description: Learn how to securely authenticate and authorize access to Azure Service Bus, including best practices for managing access keys and using Microsoft Entra ID.
44
ms.topic: article
5-
ms.date: 02/23/2024
5+
ms.date: 03/21/2025
66
---
77

88
# Service Bus authentication and authorization
@@ -13,8 +13,6 @@ There are two ways to authenticate and authorize access to Azure Service Bus res
1313

1414
This article gives you details on using these two types of security mechanisms.
1515

16-
<a name='azure-active-directory'></a>
17-
1816
## Microsoft Entra ID
1917
Microsoft Entra integration with Service Bus provides role-based access control (RBAC) to Service Bus resources. You can use Azure RBAC to grant permissions to a security principal, which can be a user, a group, an application service principal, or a managed identity. Microsoft Entra authenticates the security principal and returns an OAuth 2.0 token. This token can be used to authorize a request to access a Service Bus resource (queue, topic, and subscription).
2018

@@ -27,7 +25,7 @@ For more information about authenticating with Microsoft Entra ID, see the follo
2725
> [Service Bus REST API](/rest/api/servicebus/) supports OAuth authentication with Microsoft Entra ID.
2826
2927
> [!IMPORTANT]
30-
> Authorizing users or applications using OAuth 2.0 token returned by Microsoft Entra ID provides superior security and ease of use over shared access signatures (SAS). With Microsoft Entra ID, there is no need to store tokens in your code and risk potential security vulnerabilities. We recommend that you use Microsoft Entra ID with your Azure Service Bus applications when possible.
28+
> Authorizing users or applications using OAuth 2.0 token returned by Microsoft Entra ID provides superior security and ease of use over shared access signatures (SAS). With Microsoft Entra ID, there's no need to store tokens in your code and risk potential security vulnerabilities. We recommend that you use Microsoft Entra ID with your Azure Service Bus applications when possible.
3129
>
3230
> You can disable local or SAS key authentication for a Service Bus namespace and allow only Microsoft Entra authentication. For step-by-step instructions, see [Disable local authentication](disable-local-authentication.md).
3331

articles/service-bus-messaging/service-bus-azure-and-service-bus-queues-compared-contrasted.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ This section compares some of the fundamental queuing capabilities provided by S
5757
| Ordering guarantee | No <br/><br>For more information, see the first note in the [Additional Information](#additional-information) section.</br> | Yes - First-In-First-Out (FIFO)<br/><br>(by using [message sessions](message-sessions.md)) |
5858
| Delivery guarantee |At-Least-Once |At-Least-Once (using PeekLock receive mode. It's the default) <br/><br/>At-Most-Once (using ReceiveAndDelete receive mode) <br/> <br/> Learn more about various [Receive modes](service-bus-queues-topics-subscriptions.md#receive-modes) |
5959
| Atomic operation support |No |Yes<br/><br/> |
60-
| Receive behavior |Non-blocking<br/><br/>(completes immediately if no new message is found) |Blocking with or without a timeout<br/><br/>(offers long polling, or the ["Comet technique"](https://go.microsoft.com/fwlink/?LinkId=613759))<br/><br/>Non-blocking<br/><br/>(using .NET managed API only) |
60+
| Receive behavior |Nonblocking<br/><br/>(completes immediately if no new message is found) |Blocking with or without a time-out<br/><br/>(offers long polling, or the ["Comet technique"](https://go.microsoft.com/fwlink/?LinkId=613759))<br/><br/>Nonblocking<br/><br/>(using .NET managed API only) |
6161
| Push-style API |No |Yes<br/><br/>Our .NET, Java, JavaScript, and Go SDKs provide push-style API. |
6262
| Receive mode |Peek & Lease |Peek & Lock<br/><br/>Receive & Delete |
6363
| Exclusive access mode |Lease-based |Lock-based |
6464
| Lease/Lock duration |30 seconds (default)<br/><br/>7 days (maximum) (You can renew or release a message lease using the [UpdateMessage](/dotnet/api/microsoft.azure.storage.queue.cloudqueue.updatemessage) API.) |30 seconds (default)<br/><br/>You can renew the message lock for the same lock duration each time manually or use the automatic lock renewal feature where the client manages lock renewal for you. |
65-
| Lease/Lock precision |Message level<br/><br/>Each message can have a different timeout value, which you can then update as needed while processing the message, by using the [UpdateMessage](/dotnet/api/microsoft.azure.storage.queue.cloudqueue.updatemessage) API. |Queue level<br/><br/>(each queue has a lock precision applied to all of its messages, but the lock can be renewed as described in the previous row) |
66-
| Batched receive |Yes<br/><br/>(explicitly specifying message count when retrieving messages, up to a maximum of 32 messages) |Yes<br/><br/>(implicitly enabling a pre-fetch property or explicitly by using transactions) |
65+
| Lease/Lock precision |Message level<br/><br/>Each message can have a different time-out value, which you can then update as needed while processing the message, by using the [UpdateMessage](/dotnet/api/microsoft.azure.storage.queue.cloudqueue.updatemessage) API. |Queue level<br/><br/>(each queue has a lock precision applied to all of its messages, but the lock can be renewed as described in the previous row) |
66+
| Batched receive |Yes<br/><br/>(explicitly specifying message count when retrieving messages, up to a maximum of 32 messages) |Yes<br/><br/>(implicitly enabling a prefetch property or explicitly by using transactions) |
6767
| Batched send |No |Yes<br/><br/>(by using transactions or client-side batching) |
6868

6969
### Additional information
70-
* Messages in Storage queues are typically first-in-first-out, but sometimes they can be out of order. For example, when the visibility-timeout duration of a message expires because a client application crashed while processing a message. When the visibility timeout expires, the message becomes visible again on the queue for another worker to dequeue it. At that point, the newly visible message might be placed in the queue to be dequeued again.
70+
* Messages in Storage queues are typically first-in-first-out, but sometimes they can be out of order. For example, when the visibility-time-out duration of a message expires because a client application crashed while processing a message. When the visibility time out expires, the message becomes visible again on the queue for another worker to dequeue it. At that point, the newly visible message might be placed in the queue to be dequeued again.
7171
* The guaranteed FIFO pattern in Service Bus queues requires the use of messaging sessions. If the application crashes while it's processing a message received in the **Peek & Lock** mode, the next time a queue receiver accepts a messaging session, it will start with the failed message after the session's lock duration expires.
7272
* Storage queues are designed to support standard queuing scenarios, such as the following ones:
7373
- Decoupling application components to increase scalability and tolerance for failures
@@ -78,8 +78,8 @@ This section compares some of the fundamental queuing capabilities provided by S
7878
* Service Bus queues provide support for local transactions in the context of a single queue.
7979
* The **Receive and Delete** mode supported by Service Bus provides the ability to reduce the messaging operation count (and associated cost) in exchange for lowered delivery assurance.
8080
* Storage queues provide leases with the ability to extend the leases for messages. This feature allows the worker processes to maintain short leases on messages. So, if a worker crashes, the message can be quickly processed again by another worker. Also, a worker can extend the lease on a message if it needs to process it longer than the current lease time.
81-
* Storage queues offer a visibility timeout that you can set upon the enqueuing or dequeuing of a message. Also, you can update a message with different lease values at run-time, and update different values across messages in the same queue. Service Bus lock timeouts are defined in the queue metadata. However, you can renew the message lock for the pre-defined lock duration manually or use the automatic lock renewal feature where the client manages lock renewal for you.
82-
* The maximum timeout for a blocking receive operation in Service Bus queues is 24 days. However, REST-based timeouts have a maximum value of 55 seconds.
81+
* Storage queues offer a visibility time-out that you can set upon the enqueuing or dequeuing of a message. Also, you can update a message with different lease values at run-time, and update different values across messages in the same queue. Service Bus lock time-outs are defined in the queue metadata. However, you can renew the message lock for the pre-defined lock duration manually or use the automatic lock renewal feature where the client manages lock renewal for you.
82+
* The maximum time-out for a blocking receive operation in Service Bus queues is 24 days. However, REST-based time-outs have a maximum value of 55 seconds.
8383
* Client-side batching provided by Service Bus enables a queue client to batch multiple messages into a single send operation. Batching is only available for asynchronous send operations.
8484
* Features such as the 200-TB ceiling of Storage queues (more when you virtualize accounts) and unlimited queues make it an ideal platform for SaaS providers.
8585
* Storage queues provide a flexible and performant delegated access control mechanism.
@@ -91,7 +91,7 @@ This section compares advanced capabilities provided by Storage queues and Servi
9191
| --- | --- | --- |
9292
| Scheduled delivery |Yes |Yes |
9393
| Automatic dead lettering |No |Yes |
94-
| Increasing queue time-to-live value |Yes<br/><br/>(via in-place update of visibility timeout) |Yes<br/><br/>(provided via a dedicated API function) |
94+
| Increasing queue time-to-live value |Yes<br/><br/>(via in-place update of visibility time-out) |Yes<br/><br/>(provided via a dedicated API function) |
9595
| Poison message support |Yes |Yes |
9696
| In-place update |Yes |Yes |
9797
| Server-side transaction log |Yes |No |
@@ -123,18 +123,18 @@ This section compares Storage queues and Service Bus queues from the perspective
123123
| Comparison Criteria | Storage queues | Service Bus queues |
124124
| --- | --- | --- |
125125
| Maximum queue size |5 PiB<br/><br/>(limited to a [single storage account capacity](../storage/common/storage-introduction.md#queue-storage)) |1 GB to 80 GB<br/><br/>(Premium or Standard tier with partitioning)|
126-
| Maximum message size |64 KB<br/><br/>(48 KB when using Base 64 encoding)<br/><br/>Azure supports large messages by combining queues and blobs – at which point you can enqueue up to 200 GB for a single item. |256 KB, 1 MB or 100 MB<br/><br/>(including both header and body, maximum header size: 64 KB).<br/><br/>Depends on the [service tier](service-bus-premium-messaging.md). |
126+
| Maximum message size |64 KB<br/><br/>(48 KB when using Base 64 encoding)<br/><br/>Azure supports large messages by combining queues and blobs – at which point you can enqueue up to 200 GB for a single item. |256 KB, 1 MB, or 100 MB<br/><br/>(including both header and body, maximum header size: 64 KB).<br/><br/>Depends on the [service tier](service-bus-premium-messaging.md). |
127127
| Maximum message TTL |Infinite (api-version 2017-07-27 or later) |TimeSpan.MaxValue |
128128
| Maximum number of queues |Unlimited |10,000 (Standard tier)<br/>1000 / Messaging Unit (Premium tier)<br/>(per service namespace) |
129129
| Maximum number of concurrent clients |Unlimited |5,000 |
130130

131131
### Additional information
132132
* Service Bus enforces queue size limits. The maximum queue size is specified when creating a queue. It can be between 1 GB and 80 GB. If the queue's size reaches this limit, additional incoming messages will be rejected and the caller receives an exception. For more information about quotas in Service Bus, see [Service Bus Quotas](service-bus-quotas.md).
133-
* In the Standard messaging tier, you can create Service Bus queues and topics in 1 (default), 2, 3, 4, or 5-GB sizes. When enabling partitioning in the Standard tier, Service Bus creates 16 copies (16 partitions) of the entity, each of the same size specified. As such, if you create a queue that's 5 GB in size, with 16 partitions the maximum queue size becomes (5 * 16) = 80 GB. You can see the maximum size of your partitioned queue or topic in the [Azure portal].
133+
* In the Standard messaging tier, you can create Service Bus queues and topics in 1 (default), 2, 3, 4, or 5-GB sizes. When you enable partitioning in the Standard tier, Service Bus creates 16 copies (16 partitions) of the entity, each of the same size specified. As such, if you create a queue that's 5 GB in size, with 16 partitions the maximum queue size becomes (5 * 16) = 80 GB. You can see the maximum size of your partitioned queue or topic in the [Azure portal].
134134
* With Storage queues, if the content of the message isn't XML-safe, then it must be **Base64** encoded. If you **Base64**-encode the message, the user payload can be up to 48 KB, instead of 64 KB.
135135
* With Service Bus queues, each message stored in a queue is composed of two parts: a header and a body. The total size of the message can't exceed the maximum message size supported by the service tier.
136136
* When clients communicate with Service Bus queues over the TCP protocol, the maximum number of concurrent connections to a single Service Bus queue is limited to 100. This number is shared between senders and receivers. If this quota is reached, requests for additional connections will be rejected and an exception will be received by the calling code. This limit isn't imposed on clients connecting to the queues using REST-based API.
137-
* To scale beyond 10,000 queues with Service Bus Standard SKU or 1000 queues/Messaging Unit with Service Bus Premium SKU, you can also create additional namespaces using the [Azure portal].
137+
* To scale beyond 10,000 queues with Service Bus Standard Stock Keeping Unit (SKU) or 1000 queues/Messaging Unit with Service Bus Premium SKU, you can also create additional namespaces using the [Azure portal].
138138

139139
## Management and operations
140140
This section compares the management features provided by Storage queues and Service Bus queues.
@@ -165,13 +165,13 @@ This section discusses the authentication and authorization features supported b
165165

166166
| Comparison Criteria | Storage queues | Service Bus queues |
167167
| --- | --- | --- |
168-
| Authentication | [Symmetric key](../storage/common/storage-account-keys-manage.md) and [Role-based access control (RBAC)](../storage/queues/assign-azure-role-data-access.md) |[Symmetric key](service-bus-authentication-and-authorization.md#shared-access-signature) and [Role-based access control (RBAC)](service-bus-authentication-and-authorization.md#azure-active-directory) |
168+
| Authentication | [Symmetric key](../storage/common/storage-account-keys-manage.md) and [Role-based access control (RBAC)](../storage/queues/assign-azure-role-data-access.md) |[Symmetric key](service-bus-authentication-and-authorization.md#shared-access-signature) and [Role-based access control (RBAC)](service-bus-authentication-and-authorization.md#microsoft-entra-id) |
169169
| Identity provider federation | Yes | Yes |
170170

171171
### Additional information
172172
* Every request to either of the queuing technologies must be authenticated. Public queues with anonymous access aren't supported.
173173
* Using shared access signature (SAS) authentication, you can create a shared access authorization rule on a queue that can give users a write-only, read-only, or full access. For more information, see [Azure Storage - SAS authentication](../storage/common/storage-sas-overview.md) and [Azure Service Bus - SAS authentication](service-bus-sas.md).
174-
* Both queues support authorizing access using Microsoft Entra ID. Authorizing users or applications using OAuth 2.0 token returned by Microsoft Entra ID provides superior security and ease of use over shared access signatures (SAS). With Microsoft Entra ID, there's no need to store the tokens in your code and risk potential security vulnerabilities. For more information, see [Azure Storage - Microsoft Entra authentication](../storage/queues/assign-azure-role-data-access.md) and [Azure Service Bus - Microsoft Entra authentication](service-bus-authentication-and-authorization.md#azure-active-directory).
174+
* Both queues support authorizing access using Microsoft Entra ID. Authorizing users or applications using OAuth 2.0 token returned by Microsoft Entra ID provides superior security and ease of use over shared access signatures (SAS). With Microsoft Entra ID, there's no need to store the tokens in your code and risk potential security vulnerabilities. For more information, see [Azure Storage - Microsoft Entra authentication](../storage/queues/assign-azure-role-data-access.md) and [Azure Service Bus - Microsoft Entra authentication](service-bus-authentication-and-authorization.md#microsoft-entra-id).
175175

176176
## Conclusion
177177
By gaining a deeper understanding of the two technologies, you can make a more informed decision on which queue technology to use, and when. The decision on when to use Storage queues or Service Bus queues clearly depends on many factors. These factors depend heavily on the individual needs of your application and its architecture.

0 commit comments

Comments
 (0)