You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pubsub feature: get messages count waiting in subscription #527
I need to know how many messages are waiting in the subscription, to pop new workers or monitor the health of my system. This is something AWS SQS does too.
This feature could never be accurate because messages are always flowing into the subscription (depending on the publish rate), but it's crucial to know if you need to add more workers to process messages or monitor the health of your workers.
num_outstanding_messages: Current number of messages delivered but not yet acknowledged. num_undelivered_messages: Current number of messages pending to be delivered.
Maybe we could open up a generic subscription.getMetrics('num_outstanding_msesages') and anything else from the list: topic.getMetrics('message_sizes'), as these may all be useful.
Reacted by Robert Christian, Eric Ekong and Kosmas Papadatos
We have a few more things to implement with a higher priority before getting to this one, mostly support for the Prediction and Translate APIs, then promises.
Great to see you guys working on this already. If its worth, right now I use stackdriver's subscription metrics capabilities to get this information, apparently, stackdriver lags behind and the count is not accurate. Just wanted to add +1 to this request and happy to be a beta tester, if need be. Let me know.
Activity
pierre-b commentedon May 5, 2015
FYI: as https://code.google.com/p/cloud-pubsub/issues/detail?id=13 told me, there is a "num_undelivered_messages" endpoint to get that metric.
ryanseys commentedon May 5, 2015
Considering it's "not accurate" I wouldn't use it yet and don't think we should support it in this library until we know it is accurate.
pierre-b commentedon May 5, 2015
This feature could never be accurate because messages are always flowing into the subscription (depending on the publish rate), but it's crucial to know if you need to add more workers to process messages or monitor the health of your workers.
stephenplusplus commentedon May 5, 2015
From https://cloud.google.com/monitoring/api/metrics, they list two interesting ones:
num_outstanding_messages: Current number of messages delivered but not yet acknowledged.
num_undelivered_messages: Current number of messages pending to be delivered.
Maybe we could open up a generic
subscription.getMetrics('num_outstanding_msesages')and anything else from the list:topic.getMetrics('message_sizes'), as these may all be useful.stephenplusplus commentedon Aug 24, 2015
Assigned this to @callmehiphop since you had some ideas for how to implement this generically.
leibale commentedon Dec 10, 2015
what about this one?
stephenplusplus commentedon Dec 11, 2015
We have a few more things to implement with a higher priority before getting to this one, mostly support for the Prediction and Translate APIs, then promises.
leibale commentedon Dec 12, 2015
@stephenplusplus if i will create a pull request, you will merge?
stephenplusplus commentedon Dec 12, 2015
That would be great!
sssahas commentedon Mar 31, 2017
Great to see you guys working on this already. If its worth, right now I use stackdriver's subscription metrics capabilities to get this information, apparently, stackdriver lags behind and the count is not accurate. Just wanted to add +1 to this request and happy to be a beta tester, if need be. Let me know.
25 remaining items
chore: add dev dependencies for cloud-rad ref docs (#527)
chore: add dev dependencies for cloud-rad ref docs (#527)
chore: add dev dependencies for cloud-rad ref docs (#527)
fix(deps): update dependency @grpc/grpc-js to v0.6.10 (#527)
chore: add dev dependencies for cloud-rad ref docs (#527)
chore: add dev dependencies for cloud-rad ref docs (#527)
fix(deps): update dependency @grpc/grpc-js to v0.6.10 (#527)
fix(deps): update dependency @grpc/grpc-js to v0.6.10 (#527)
build: ignore googleapis.com in doc link check (#527)
fix(typo): correct typo: recieved => received (#527)
test: modernize mocha config (#527)
fix(types): Include TypeScript types with module (#527)
fix(types): Include TypeScript types with module (#527)
fix(types): Include TypeScript types with module (#527)
fix(types): Include TypeScript types with module (googleapis#527)