Google PubSub-计算主题中的邮件 [英] Google PubSub - Counting messages in topic

查看:65
本文介绍了Google PubSub-计算主题中的邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了Google PubSub的文档,并尝试在Google Cloud Monitoring中查找,但是找不到任何方法来弄清主题中的队列大小.

I've looked over the documentation for Google's PubSub, and also tried looking in Google Cloud Monitoring, but couldn't find any means of figuring out what's the queue size in my topics.

由于我计划使用PubSub进行分析,因此监视队列计数对我来说很重要,这样我就可以按比例增加/减小订户数量.

Since I plan on using PubSub for analytics, it's important for me to monitor the queue count, so I could scale up/down the subscriber count.

我想念什么?

推荐答案

您要查看的指标是未送达的邮件".您应该能够在"Pub/订阅"资源类型.订阅者尚未确认的消息数(即队列大小)是按预订量度,而不是按主题量度.有关指标的信息,请参见 GCP指标列表中的pubsub.googleapis.com/subscription/num_undelivered_messages (以及其他所有可用的发布/订阅指标).

The metric you want to look at is "undelivered messages." You should be able to set up alerts or charts that monitor this metric in Google Cloud Monitoring under the "Pub/Sub Subscription" resource type. The number of messages that have not yet been acknowledged by subscribers, i.e., queue size, is a per-subscription metric as opposed to a per-topic metric. For info on the metric, see pubsub.googleapis.com/subscription/num_undelivered_messages in the GCP Metrics List (and others for all of the Pub/Sub metrics available).

这篇关于Google PubSub-计算主题中的邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆