Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
586 stars 781 forks source link

Documentation clarification #720

Closed dee-cf closed 2 weeks ago

dee-cf commented 2 weeks ago

On this page https://learn.microsoft.com/en-us/azure/service-bus-messaging/message-counters

docs say:

If an application wants to scale resources based on the length of the queue, it should do so with a measured pace. The acquisition of the message counters is an expensive operation inside the message broker, and executing it frequently directly and adversely impacts the entity performance.

Is there any quantification of that statement? What is the measured way? What is too much? What is reasonable? Just as an order of magnitude clarification would be very useful.

EldertGrootenboer commented 2 weeks ago

There are no explicit recommendations, as it all depends on the rest of your environment. In general, we would recommend getting the counters not more than once a minute, however this is not a hard limit. Depending on the throughput of your workloads, size of the messages, use of features, etc., your solution might have plenty of resources available, or already be low on resources. In general, this statement is meant as a guidance to prevent slowdown of your workloads due to behavior which might not explicitly be useful for your scenario.