Expose `MessageCount` values in paged namespace queries
See original GitHub issueQuery/Question
It looks that the MessageCount
values are available at the client-side when GetQueueAsync()
is executed via Azure ServiceBus client.
Why is this not a Bug or a feature Request?
This is a performance improvement. Currently MessageCount
value for a queue is accessible via property on QueueRuntimeInfo class.
When querying for multiple MessageCount
values in the namespace at once there are 1+n requests needed.
First, one to get a list of available queues in the namespace via
managementClient.GetQueuesAsync()
and later, n calls for each queue to get the QueueRuntimeInfo:
managementClient.GetQueueRuntimeInfoAsync()
Setup (please complete the following information if applicable):
- OS: [e.g. iOS]
- IDE : [e.g. IntelliJ]
- Version of the Library used
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Query Added
- Setup information Added
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (9 by maintainers)
Top GitHub Comments
@tmasternak , sorry, but this needs further discussion internally and I’d like you to hold off on a new PR creation for this for now.
@nemakam I’ve opened a PR which proposes adding a new method to
ManagementClient
. I started off adding theMessageCount
to theQueueDescription
but realized that it’s designed with library client modifications in mind i.e. all property setters are public. Adding a newMessageCount
property could lead to confusion as it’s a read-only value contrary to all the other values.As a result, I’ve added a dedicated method similar to
GetQueuesAsync
that returns queue runtime information in pages. Please have a look.