简体   繁体   中英

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:

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"

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM