googleapis / nodejs-pubsub

Node.js client for Google Cloud Pub/Sub: Ingest event streams from anywhere, at any scale, for simple, reliable, real-time stream analytics.
https://cloud.google.com/pubsub/
Apache License 2.0
518 stars 230 forks source link

Retry settings sample needs clarification about settings object #1952

Open feywind opened 1 month ago

feywind commented 1 month ago

In this sample...

https://github.com/googleapis/nodejs-pubsub/blob/main/samples/typescript/publishWithRetrySettings.ts

We are showing the full, original object and documenting what each setting does. However, it's not obvious at all that this entire structure will replace the original in gax. It's easy to end up in a situation where a bunch of the settings get set to zero. This should be improved.

The defaults shown are also old at this point and should be updated.