Conditions for Azure Service Bus Throttling in the Messaging Platform

Conditions for Azure Service Bus Throttling in the Messaging Platform

When designing a solution in Azure, Guest Posting, it is essential to always keep any potential restrictions in mind. These restrictions may result from technical constraints as well as tier selection. We will examine the Service Bus throttling conditions and how to deal with them in this section. On the documentation page, you can see that there are a number of thresholds that will affect the maximum throughput that can be achieved before throttling conditions occur.

Size of the queue or topic Number of concurrent connections on a namespace Number of concurrent receive requests on a queue/topic/subscription entity Size of the message for a queue/topic/subscription entity Number of messages per transaction Understanding each is essential because it enables us to make decisions regarding the subsequent steps. Additionally, to reduce risks, set up a resilient architecture. Let’s take a look at each and the choices available to lower these thresholds. Size of the queue or topic This threshold, which was set when the queue or topic was created, represents the maximum size of a Service Bus entity.

When messages are either not retrieved from the entity at all or are retrieved at a slower rate than they are sent. Until the entity reaches this size, it will fill. QuotaExceededException is thrown back to the sender when the entity reaches this limit, rejecting any new messages. For the basic or standard tier, the maximum size of an entity can be 1, 2, 3, 4, or 5 GB without partitioning. Partitioning is available for the premium tier as well as the 80GB standard tier. To ensure that our entity can keep up with the ingested messages when this occurs, one option is to add additional message receivers. Another option would be to use an exponential backoff retry mechanism to catch the exception if the entity is not under our control.

Receivers have a chance to catch up on processing the messages in the queue by implementing an exponential backoff. Another choice is to have the collectors use prefetching, which permits higher throughput, clearing the messages in our element at a quicker rate.

The number of connections that can be opened simultaneously to a Service Bus namespace is the subject of the second threshold that will be discussed in this post. Our entity will reject subsequent connection requests with a QuotaExceededException exception once all of these have been utilized. It is essential to be aware that queues share their connections between senders and receivers in order to mitigate this condition. However, topics have their own pool of connections for both senders and receivers. The communication protocol is also very important because AMQP gives us 5000 connections while NetMessaging only allows for 1000. This indicates that the entity owner can effectively double the number of connections by switching from queues to topics.

However, be aware that this will only increase the total number of connections that are permitted; however, if there are already a significant number of senders or receivers, it will still only provide us with the maximum number of connections that the selected protocol provides for each of these. There is also the option to switch protocols if the sender or receiver client is under our control. Switching from NetMessaging to AMQP could give us five times as many connections.

Add a Comment

Your email address will not be published. Required fields are marked *