0
votes

We use Azure Service Bus to send messages from one service to another. Producer produces quite huge amount of messages(a couple of millions) during 1-2 hours. As a result our Service Bus(we use Premium Azure Service Bus) is throttled and we receive errors on producer and consumer sides. I wonder if we could check somehow the load of our ASB by using Azure SDK(we use ASB Java SDK) and if it is high we can slow down the services that sends messages into the queue/topic. I also understand that we can add more Premium units, but it is the last option we will take.

What we use:

  • Azure Service Bus Java SDK
  • Java 9 and Spring Boot 2.0
  • Azure Service Bus Premium version

Do you have any recommendations for my case? Any recommendation - patterns, frameworks, ASB SDK features would be great.

1

1 Answers

0
votes

What you usually can do is to check from the portal your usage (from the overview panel), there is no feature in the SDK itself that can show you the load on your service bus namespace. Since you're using premium messaging, there is no certain threshold that can determine if you've exceeded your messaging unit capacity or not. you will get throttling errors as shown in the documentation:

Also be aware that you can scale up and down according to your usage with how many messaging units you want.