[pubsub] make the keepalive robuster #382
Labels
api: pubsub
Issues related to the Pub/Sub API.
🚨
This issue needs some love.
triage me
I really want to be triaged.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
I have just migrated from the legacy client code to the newer pubsub client. In that project, I'm using pubsub for task queuing. Tasks can take from 30 seconds, or up to 8 hours.
I used to extend the ackDeadline within my code, with 15 seconds grace period and 3 times retries.
Now we're seeing significantly more failures on extending the ackDeadline.
I briefly looked at the source code of the current library and found the code below:
And keepalive retries just one time when modifyAckDeadline fails.
If I'm not mistaken, if the first attempt for modifying the ackDeadline fails with somewhat long latency (for example, somehow the request hangs for 5 seconds and fails), then it fails to modify the ackDeadline, thus we get the same message again.
Here are my suggestions for making it robuster:
The text was updated successfully, but these errors were encountered: