0
votes

In my application all the events are getting stored in Azure service Bus queue, and another component reads that queue and process the events.We are using Azure-servicebus java sdk version 0.9.2.

After processing few thousand events we are getting below Service Bus error.

Caused by: com.microsoft.windowsazure.exception.ServiceException: WRAP server returned error acquiring access_token
Response Body: ACS90055: The server has terminated the request (tenant exceeded rate limit). Please wait a few seconds and try again.

It slows down my application.Also I am loosing a lot of events.

How to get pass this error ?

How to fetch messages in a batch, Instead of fetching individual call for single message ?

Do we have Batch Receive support for Azure service bus Java SDK ? If no what other way we should follow for Java Application using Azure Service bus.

How to increase the rate limit for my tenant ?

Thanks, Abhi

2

2 Answers

0
votes

as far as i remember, that error occurs because of the underlying ACS service and that limit documented here - https://msdn.microsoft.com/en-us/library/gg185909.aspx . Service Bus in that case is working like a "middleware".

Recommendation could be use of Shared Access Signatures. Could you try and say if that works? https://azure.microsoft.com/en-us/documentation/articles/service-bus-shared-access-signature-authentication/

Regarding "receive batch", there is https://msdn.microsoft.com/library/azure/microsoft.servicebus.messaging.subscriptionclient.receivebatch.aspx . Sorry, do not have the ready-and-working example here. But again, i believe it is not SB limits that you are hitting into.

0
votes

As @AlexBelotserkovskiy said, the section "Token Request Rate Limit" of the document "ACS Service Limitations" explained the reason for the error HTTP 429 "Too many requests" error with the ACS90055 error code.

Meanwhile, the content below supplied the workaround, please see below.

If the retries are not distributed over increasing time intervals, the accumulated retries are likely to exacerbate the problem and prolong the period during which token requests are rejected. If you are getting recurring ACS90055-HTTP 429 errors because your namespace is exceeding the token request rate limit, consider redistributing your workload by replacing a single namespace with several smaller namespaces.

So I think you can try to limit the number of requesting Service Bus per second, or create more namespaces of Service Bus to balance the workload.