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
516 stars 227 forks source link

Lease management settings should be consolidated in one place #1914

Open hongalex opened 2 months ago

hongalex commented 2 months ago

Currently, controlling min/max ack deadline is done in SubscriberOptions, but configuring the total extension (for a message's ack deadline) is in FlowControlOptions.

These are related settings and should be in the same place.

Separately, flow control options being in a the lease-manager.ts file seems strange, since lease management should only concern itself with modacks rather than flow/concurrency control.

feywind commented 2 months ago

As discussed elsewhere, the settings can't be changed until a breaking major. The lease manager changes are planned for an internals cleanup effort.

feywind commented 2 months ago

Kinda looks like the lease manager separation is going to help with this issue, too:

https://github.com/googleapis/nodejs-pubsub/issues/1213

So I might do that sooner rather than later.