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

天大地大妈咪最大 提交于 2019-12-24 07:17:36

问题


When deploying a background Cloud Function for Cloud Pub/Sub via:

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

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)

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"

Doing it via the web interface on GCP would also yield an error: "pubsub error INVALID_ARGUMENT"


回答1:


When connecting to a Cloud Pub/Sub topic via Cloud Functions, a subscription is created on your behalf. This subscription is managed by Cloud Functions and therefore it is not possible to update the acknowledgement deadline.



来源:https://stackoverflow.com/questions/55009740/how-to-modify-google-cloud-pub-sub-subscription-acknowledgement-deadline-for-bac

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