一般:3-推送至端点网址(gmail的pubsub api) [英] generic:3 - Push into an endpoint URL (pubsub api for gmail)

查看:78
本文介绍了一般:3-推送至端点网址(gmail的pubsub api)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是第一次使用pub/sub,这很令人困惑.每当我收到有关gmail帐户的电子邮件时,我只想在我的MVC应用程序上接收推送通知.我已经设置了项目ID(已启用pub/sub API),创建了具有权限的主题(gmail-api-push@system.gserviceaccount.com),并向该主题添加了订阅者,console.cloud.google.com中的所有内容均作为我认为我不需要每次都从我的代码中进行设置. 我正在尝试使用自己选择的URL将传递类型设置为推入端点URL"(我尝试设置localhost/home,也使用SSL,然后是我的在线域之一进行测试),但始终保持这种通用" :3错误(位于左下角).我不想每次都使用拉"作为投放类型.

I am working with pub/sub for the first time and its quite confusing. I just want to receive push notifications on my MVC application whenever I receive an email on gmail account. I have setup the project id (enabled pub/sub API), created a topic with permissions (gmail-api-push@system.gserviceaccount.com) and added a subscriber to that topic, everything from console.cloud.google.com as I don't think I need to setup these from my code everytime. I am trying to set the delivery type to 'Push into an endpoint URL' with the URL of my choice (I tried to setup localhost/home, also with SSL, then one of my online domains for testing) but keep getting this "generic:3" error on bottom-left. I don't want to use 'Pull' each time as the delivery type.

除了developers.google.com之外,没有太多帮助,但是我没有得到此错误的原因.任何帮助将不胜感激

There isn't a lot of help on this apart from developers.google.com but I'm not getting the reason for this error. Any help would be highly appreciated

推荐答案

基于此文档,如果要在Gmail邮箱发生更改时推送通知,则需要使用 Cloud Pub/Sub API .请注意,在推送交付中,发布/订阅服务器会将请求发送到订户应用程序,在预配置的端点. 订阅者的HTTP响应用作隐式确认:成功响应表示消息已成功处理,Pub/Sub系统可以将其从订阅中删除;如果响应失败,则表明发布服务器/订阅服务器应重新发送.

Based from this documentation, if you want to push notifications when there are changes to Gmail mailboxes, you need to use the Cloud Pub/Sub API. Be noted that in push delivery, the Pub/Sub server sends a request to the subscriber application, at a preconfigured endpoint. The subscriber's HTTP response serves as an implicit acknowledgement: a success response indicates that the message has been successfully processed and the Pub/Sub system can delete it from the subscription; a non-success response indicates that the Pub/Sub server should resend it.

通常, 一般性错误 在事务失败时发生.默认情况下,消息过滤器失败时,API网关会向客户端返回一个非常基本的错误.您可以在此论坛中尝试解决方法.

Usually, generic error occurs when a transaction fails. By default, the API Gateway returns a very basic error to the client when a message filter fails. You can try the workaround in this forum.

这篇关于一般:3-推送至端点网址(gmail的pubsub api)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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