Search code examples
pythonpublish-subscribegoogle-cloud-pubsub

How to modify ack deadline for a push subscription message on GCP Pub/Sub?


I am trying to figure out how to modify the ack deadline for a push subscription message. The problem is, I don't have the ack Id which is a required argument for the modify_ack_deadline function. The message which is being pushed to the endpoint doesn't seem to have the acknowledgement id in it. So my question is, how do I get a hold of this acknowledgement id if it's even possible?

Ref: https://googleapis.dev/python/pubsub/latest/pubsub/subscriber/api/client.html#google.cloud.pubsub_v1.subscriber.client.Client.modify_ack_deadline


Solution

  • There is no way to modify the ack deadline when using a push subscription. The message must be acknowledged within the subscription's configured ack deadline. If extending the ack deadline is needed, the a pull subscription must be used.