Reputation: 519
How could i get the total number of unprocessed message count from Azure Service bus using JAVA. Is there any API that can show the total number of message that is yet to be processed.
Is there any equivalent to the below .Net library in JAVA link
.Net Namespace: Microsoft.ServiceBus.Messaging
Whats the equlant for the above .Net Namespace in JAVA?
Upvotes: 3
Views: 2007
Reputation: 23792
Is there any API that can give me the number of message in the service bus using JAVA?
You could refer to Message counters doc. You could use MessageCountDetails
Class to get ActiveMessageCount
property.
Which is equivalent to the .NET library MessageCount
in java: https://learn.microsoft.com/en-us/java/api/com.microsoft.azure.management.servicebus._queue.messagecount
Upvotes: 1
Reputation: 31
There are Java classes available for management of the Service Bus and I think the one you're looking for is MessageCountDetails. There are examples of how to use the management classes in their GitHub repo. Currently that uses version 0.9.7 of the Azure Service Bus libraries, but same classes seem to exist in the latest 2.0.0-PREVIEW-7.
Upvotes: 0