简体   繁体   English

如何修改后台 Cloud Functions 的 Google Cloud Pub/Sub 订阅确认截止日期

[英]How to modify Google Cloud Pub/Sub subscription acknowledgement deadline for background Cloud Function

When deploying a background Cloud Function for Cloud Pub/Sub via:通过以下方式为 Cloud Pub/Sub 部署后台 Cloud Function 时:

gcloud functions deploy function_name --runtime python37 --trigger-topic some_topic

A subscription gets automatically created with a push endpoint (likely App Engine standard endpoint, but those are claimed to be without the need of domain verification https://cloud.google.com/pubsub/docs/push#other-endpoints ).使用推送端点(可能是 App Engine 标准端点,但声称不需要域验证https://cloud.google.com/pubsub/docs/push#other-endpoints )自动创建订阅。

For the generated subscription/endpoint there doesn't seem like a way to register/verify the domain ( https://www.google.com/webmasters/verification , https://console.cloud.google.com/apis/credentials/domainverification )对于生成的订阅/端点,似乎没有注册/验证域的方法( https://www.google.com/webmasters/verificationhttps://console.cloud.google.com/apis/credentials /域验证

As a result the user cannot alter the subscription, for instance:因此,用户无法更改订阅,例如:

gcloud alpha pubsub subscriptions update some_subscription --ack-deadline=10

Would yield something like "INVALID_ARGUMENT: The supplied HTTP URL is not registered in the subscription's parent project"会产生类似“INVALID_ARGUMENT:提供的 HTTP URL 未在订阅的父项目中注册”的内容

Doing it via the web interface on GCP would also yield an error: "pubsub error INVALID_ARGUMENT"通过 GCP 上的 Web 界面执行此操作也会产生错误:“pubsub error INVALID_ARGUMENT”

When connecting to a Cloud Pub/Sub topic via Cloud Functions, a subscription is created on your behalf.通过 Cloud Functions 连接到 Cloud Pub/Sub 主题时,将代表您创建订阅。 This subscription is managed by Cloud Functions and therefore it is not possible to update the acknowledgement deadline.此订阅由 Cloud Functions 管理,因此无法更新确认截止日期。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 Pub/Sub 订阅中提取的 Google Cloud Function 会引发异常 - 已超过截止日期 - Google Cloud Function pulling from Pub/Sub subscription throws exception - Deadline Exceeded Google Cloud - Pub Sub Push Subscription 调用云 function 重试 - Google Cloud - Pub Sub Push Subscription invoked cloud function retry Google云端pub / sub订阅的持久性? - Google cloud pub/sub subscription durability? 为存储桶创建 Google Cloud Pub/Sub 订阅? - Create a Google Cloud Pub/Sub subscription for a Bucket? 跨发布/订阅订阅触发云功能 - Trigger Cloud Function across Pub/Sub Subscription gcp 云发布/订阅推送订阅最大确认截止日期与云运行最大运行时不兼容 - gcp cloud pub/sub push subscription max ack deadline not compatible with cloud run max runtime 推送订阅中的Google Cloud Pub / Sub - INVALID ARGUMENT错误 - Google Cloud Pub/Sub - INVALID ARGUMENT error in Push subscription google cloud pub sub 多个订阅者使用同一订阅获取同一消息 - google cloud pub sub multiple subscriber for the same message with the same subscription Google Cloud Pub/Sub 具有订购密钥和同一订阅上的多个消费者 - Google Cloud Pub/Sub with ordering keys & multiple consumers on same subscription 如何谷歌云发布/订阅忽略消息 - how to google cloud pub/sub ignore message
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM