is it possible to modify ack deadline beyond 60 seconds

454 views
Skip to first unread message

Sachin Shetty

unread,
Dec 20, 2017, 3:56:04 PM12/20/17
to Google Cloud Pub/Sub Discussions
Hi,

I am using the python client and running modify_ack_deadline every minute by 70 seconds. However after exactly 10 minutes, message is redelivered. It seems modify_ack_deadline does not work beyond 10 minutes, is there a way to keep renewing the dealine beyong 10 minutes? Our backend message processing could take hours.

Thanks
Sachin

Kamal Aboul-Hosn

unread,
Dec 20, 2017, 4:53:15 PM12/20/17
to Sachin Shetty, Google Cloud Pub/Sub Discussions
Hi, Sachin,

Holding on to messages for hours for processing is an anti-pattern for Cloud Pub/Sub. With messages outstanding for that long, you run a large risk of messages being redelivered, which is what you are running into. You'd be better off writing the message to some kind of persistent storage once you receive it and then acking the message at that point, ensuring you then process any messages that are still in persistent storage. In this scenario, you may find that Pub/Sub is not well suited to your use case and that you are better off just writing to persistent storage directly instead of publishing a message.

Regards,

Kamal

--
You received this message because you are subscribed to the Google Groups "Google Cloud Pub/Sub Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/a2f7fb43-d2a5-4c91-86cf-c9f3c3f80b5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages