How to get total number of unprocessed message count from Azure Service bus using JAVA

Smita Mohapatra 41 Reputation points
2022-04-14T13:02:52.153+00:00

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 ???
https://learn.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.queuedescription.messagecount?view=azure-dotnet

.Net Namespace: Microsoft.ServiceBus.Messaging

Whats the equlant for the above .Net Namespace in JAVA?

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
700 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2022-04-18T05:21:25.327+00:00

    @Smita Mohapatra Thanks for reaching out. As per the Java API reference document I can see below Java SDK that can be used to get the active message count.

    Using com.microsoft.azure.management.servicebus : MessageCountDetails Class has activeMessageCount method that returns the activeMessageCount value.
    Using com.microsoft.azure.servicebus.management : MessageCountDetails Class has getActiveMessageCount method that returns the activeMessageCount value.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.