I'm getting the below exception in Windows Azure when I attempt to retrieve messages from the service bus.
Microsoft.ServiceBus.Messaging.ServerBusyException: The request was terminated because the entity is being throttled. Please wait 10 seconds and try again
The exception occures after calling the Receive
method:
QueueClient queueClient = _messagingFactory.CreateQueueClient(queueName);
var brokeredMessage = queueClient.Receive(TimeSpan.Zero);
Is this configurable or am I putting to much demand on the message bus?
User errors generally occur due to mistakes in the client application like, InvalidOperationException, The requested user operation is not allowed within the server or service. For example, Complete() generates InvalidOperationException if the message was received in ReceiveAndDelete mode.
For example, you can implement the following scaling scenarios for Service Bus namespaces using the Autoscale feature. Increase messaging units for a Service Bus namespace when the CPU usage of the namespace goes above 75%.
Benchmarks against Service Bus queues have demonstrated that a single queue can achieve a message throughput of up to 2,000 messages per second with a message size of approximately 1 KB. To achieve higher throughput, use multiple queues.
Maximum delivery count The default value is 10. Whenever a message has been delivered under a peek-lock, but has been either explicitly abandoned or the lock has expired, the delivery count on the message is incremented. When the delivery count exceeds the limit, the message is moved to the DLQ.
Without knowing more than what you posted, it appears that you were taxing your Service Bus instance to the max. However, with this question originally being from almost 7 years ago, it's important to note that the Azure Service Bus scalability targets have increased much over this time.
You can reference this Azure documentation article for more information on the quotas and throttling thresholds for Azure Service Bus:
https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With