watch request to new topic pauses push notifications to existing topic

微笑、不失礼 提交于 2019-12-31 02:26:07

问题


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

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?

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!


回答1:


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.)



来源:https://stackoverflow.com/questions/44977820/watch-request-to-new-topic-pauses-push-notifications-to-existing-topic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!