Skip to content

How to Receive Bulk Messages from Azure Service bus #661

Description

@arbarik

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.

Alert me | Edit | Change type
Question
You cannot vote on your own post
0
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 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 ?

I am using below code to receive all the messages from Queue:
` ServiceBusConfiguration.configureWithWrapAuthentication(
ServiceBusName,
ServiceBusAuthenticationName,
ServiceBusSharedSecret,
ServiceBusRootUri,
ServiceBusWrapRootUri);

ReceiveMessageOptions options = new ReceiveMessageOptions();

options.setReceiveAndDelete();
ServiceBusContract service = ServiceBusService.create(serviceBusConfig);


ReceiveQueueMessageResult message =
    service.receiveQueueMessage(queueName, options);

   while( message.getValue() != null){

//Process the message .
message =
service.receiveQueueMessage(queueName, options);

   }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions