-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat: Add channel statistics data return command #1494
base: master
Are you sure you want to change the base?
Conversation
I think this seems reasonable, thanks for submitting! Why didn't you use the |
The HTTP method requires initiating a request, and in practical use, it is more convenient to directly use the Consumer object |
I thought these were client stats, these are actually channel stats. What's the thinking here? Regardless of the semantics of the (FWIW the client.Stats function does not perform an HTTP request). |
I read the |
I still think we should improve the API for how we get channel-related stats for an individual client, rather than duplicating the code and making this method aware of the concurrency and locking necessary to do it correctly. |
The main data we want to obtain from this API are depth and backend_depth. The other data are additional and can be omitted. This way, we can avoid locking and unlocking operations in the Stats method. |
We want the connected client to be able to check how many tasks are left to consume in the subscribed channel, which will help us predict the remaining consumption time for our business purposes. We prefer not to query this information via HTTP; using TCP within the business code would be more convenient. |
API consumers can query channel statistics information