feat(pubsub): retry batches for ordering key messages forever#4722
feat(pubsub): retry batches for ordering key messages forever#4722suzmue merged 3 commits intogoogleapis:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4722 +/- ##
==========================================
- Coverage 95.09% 95.08% -0.01%
==========================================
Files 198 198
Lines 7599 7606 +7
==========================================
+ Hits 7226 7232 +6
- Misses 373 374 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
"forever" scares me.... does that literally mean that the client library will retry without any stop condition? Regardless of the number of attempts or the time trying? Is that a default? Can applications override it? |
Yes, forever means forever.
Its the default for messages with ordering keys
Not currently. This is the guidance for how to implement ordering in the publisher (see go/ordering-keys-library). If we are scared of actual forever, I think some of the other high level client libraries use a time limit that is Duration::MAX, but I think that is a product of how their retries are implemented, and it is effectively the same. |
The Pub/Sub client libraries support ordered publishing for messages with ordering keys. Publishing for an ordering key is stopped when there is a permanent error. Since the cost of failing on trayient libraries will retry transient errors indefinitely.
This change overrides the retry policy for batches with ordering keys. There is currently no way to configure this retry policy for the clients, we may wish to add one in the future.
For #4013