当有明确的消息等待处理时,拉订阅不返回消息

时间:2016-03-09 19:35:20

标签: python google-cloud-platform google-kubernetes-engine google-cloud-pubsub

我有一个相当简单的设置,我有许多不同的工作人员监控不同的资源。当其中一个人发现新内容时,他们会向Google PubSub发布消息,然后我让一名工作人员通过PubSub主题获取消息并通过Google Cloud Messenger发送消息。

这应该非常简单,而且大部分都有效。然而,我遇到了一个有趣的情况,当我拉动时,我有时只会返回消息,如果PubSub主题为空,这将是有意义的。然而,这个话题并不空洞,并且规模不断扩大。我的工人拉动的消息现在通常大约晚了45分钟。

根据堆栈驱动程序,我的PubSub消息队列现在有10,000条消息等待传递。 :(

以下是工作人员执行拉动的代码:https://github.com/Regner/en-notifications

19:05:36.000 INFO:root:Polling for new notifications...
19:05:25.000 INFO:root:Polling for new notifications...
19:05:15.000 INFO:root:Polling for new notifications...
19:05:04.000 INFO:root:Polling for new notifications...
19:04:55.000 INFO:root:Polling for new notifications...
19:04:44.000 INFO:root:Polling for new notifications...
19:04:44.000 INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): gcm-http.googleapis.com
19:04:44.000 INFO:root:Sending message to the following topic "/topics/zkb-kills-1000181"
19:04:44.000 INFO:root:Got message ID 17004238187730 with attributes {u'subtitle': u'Mhorbids One just lost a Executioner worth 3,431,051.31 ISK in Evaulon.', u'service': u'en-zkillboard', u'title': u'zKillboard', u'url': u'https://zkillboard.com/kill/52505094/', u'topic': u'zkb-kills-1000181', u'collapse_key': u'zkb-kills-1000181'}.
19:04:44.000 INFO:root:Polling for new notifications...

Stack driver graphs showing message queue

其他一些信息: *这些都是作为带有Google容器引擎的容器运行的 *我尝试过更多拉动容器的复制品,但它似乎没有改变消息被拉动的速度。

我真的很感激任何帮助,弄清楚为什么会这样。这真让我很困惑。

提前感谢您提供任何帮助。

Regner

0 个答案:

没有答案