-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQ] Get Session Information for a Queue/Subscription - Azure.Messaging.ServiceBus #20569
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @axisc. Issue DetailsLibrary or service name. Is your feature request related to a problem? Please describe. If it isn't a good touch point for the client SDK to pull these stats, has the ASB service team considered exposing a metric for this? We could then hook up with KEDA via the Azure Monitor scaler and let it rip. Thank you for your consideration and the great work on the new SDK!
|
Hi @davidallyoung. Thank you for your feedback. To my knowledge, the client library is exposing all of the information that the Service Bus service makes available, in the form of the QueueRuntimeProperties accessible from the ServiceBusAdministrationClient. Unless we've overlooked something, to return session information, we'll need to ask the Service Bus team to make that available. I've routed this to the Service Bus team for their thoughts. |
Related - #7380 |
To add some more context on some other use-cases that I think are really interesting/useful for folks using sessions and run their workload in kubernetes. Also, @JoshLove-msft thank you for pulling out that issue reference, I had forgotten that I had commented on that already 😅 . |
Is there any issue open publicly with the service bus team for this? Also how is service bus explorer able to produce a list of sessions active on a queue? edit: Apparently doable via AQMP - https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-request-response#enumerate-sessions and whatever is going on here in the legacy library:
|
It does look like there is service support, but my understanding is that there were reliability concerns when we attempted to implement this in the JS SDK. |
Yes, when we tried to implement enumerate-sessions in the JS SDK 2 years ago, we did see the API behave unpredictably. Not sure if anything has changed since then, but we will sync with the service team and get back |
This feature would be useful when tuning the concurrency of a ServiceBusSessionProcessor. |
/cc @mathewc |
The API requires passing in a last-updated-time. If the value is not supplied the server returns an error response. After supplying this value, we only get back sessionIds that have session state set on them after this time. So if someone is not setting session state, they get back 0 sessions. For sessions where session state is set, the session appears to always be returned even after all messages are completed. Perhaps this makes sense considering that this API appears to be designed to work based on the session state modified time. |
Because this only works based on the session state update time, and it doesn't even filter sessions that no longer have active messages, the available service feature doesn't address the user ask which is to get access to session counts for scaling purposes. |
At present, there is no way to implement this on the client, as service support does not exist. The Service Bus team has indicated that this is not on their roadmap currently. I'm going to close this issue out; should the service offer an API for this information, the client will support it. If you would like to advocate for service support, consider opening a feature request in the Service Bus forum of the Azure feedback site. |
Library or service name.
What library or service is this request related to? [e.g. Azure.Storage.Blobs]
Azure.Messaging.ServiceBus
Is your feature request related to a problem? Please describe.
What feature would you like to get added? What problem is it solving?
Hi! My team is working with Sessions and having a pretty good experience leveraging them for distributing multi-tenant workloads. One of the challenges we're running into is being a bit more proactive about our scaling vs using CPU/memory. What we'd really like to be able to build around are metrics about how many sessions are on the entity. My ask here if it would be possible for the client SDK to procure theses statistics? I use ServiceBusExplorer quite a lot and it seems to have a way to grab the Sessions on an entity, but it seems like that is on one of the older revisions of the SDK.
If it isn't a good touch point for the client SDK to pull these stats, has the ASB service team considered exposing a metric for this? We could then hook up with KEDA via the Azure Monitor scaler and let it rip.
Thank you for your consideration and the great work on the new SDK!
The text was updated successfully, but these errors were encountered: