观看对新主题的请求会暂停向现有主题的推送通知 [英] watch request to new topic pauses push notifications to existing topic

查看:40
本文介绍了观看对新主题的请求会暂停向现有主题的推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个项目下的Google Cloud Pub/Sub帐户中配置了两个主题,每个主题都有一个订阅.

I've configured two topics in my Google Cloud Pub/Sub account, each with a single subscription, under a single project.

当我在收件箱中调用watch()并将主题1传递给监视请求时,我会收到推送通知到所需的端点.当我在收件箱中为 topic 2 调用watch()时,我收到与主题2关联的终结点的推送通知,但是推送通知不再针对主题1 到达.

When I call watch() on my inbox, passing topic 1 to the watch request, I receive push notifications to my desired endpoint. When I call watch() on my inbox for topic 2, I receive push notifications for the endpoint tied to topic 2, but push notifications stop arriving for topic 1.

对于给定项目,似乎只有一个主题可以在任何给定时间针对给定收件箱发出通知.任何人都可以帮助确认是否是这种情况吗?

It appears that only a single topic can push out notifications for a given inbox at any given time, for a given project. Can anyone help confirm whether this is the case?

我在 Gmail推送通知的文档中找不到任何内容注意到了这一限制.每当我再次调用watch()时(从主题1订阅到主题2,再调用watch(),反之亦然),我都会从API收到成功的响应,但是关于我之前订阅的主题的通知仍然停止.对于watch()请求,我也处于到期窗口之内.

I can't find anything in the documentation for Gmail push notifications that notes this limitation. I receive a successful response from the API every time I call watch() again (subscribed to topic 1 -> call watch() for topic 2, and vice versa), but notifications still stop for the topic I was previously subscribed to. I'm also well within the expiry window for the watch() requests.

任何建议/指导将不胜感激!

Any advice / direction would be much appreciated!

推荐答案

每个开发人员只能在给定的邮箱上进行一次监视设置.未明确指定,但API调用表示watch()调用用于设置或更新手表: https://developers.google.com/gmail/api/v1/reference/users/watch (在REST中,没有"List Watches","watch.id"唯一标识符等可以允许多个手表使用的内容.一个手表是一个单例资源.)

Each developer can only have one watch setup on a given mailbox. It's not specified explicitly but the API call says the watch() call is for either setting up or updating the watch: https://developers.google.com/gmail/api/v1/reference/users/watch (there's no "List Watches", "watch.id" unique identifier, etc that would be required in REST for multiple watches to be allowed. A watch is a singleton resource.)

这篇关于观看对新主题的请求会暂停向现有主题的推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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