SubscriberOptions are not documented anywhere
The SubscriberOptions documentation is seemingly not available anywhere other than the source code. We do not define them anywhere in the documentation we link to from our product documentation, though we refer to the type: https://googleapis.dev/nodejs/pubsub/latest/PubSub.html#subscription. We should audit and make sure all necessary types are defined in the documentation.
This has turned out to be a bit of a rabbit-hole, and I'm not entirely convinced that we can make it do the obvious thing. It may have to wait for us to update our docs tooling. I've been working on fixing what I can, here.
I have a similar problem. I wanted to update to v5.0.0, but it looks like ackDeadline has been replaced with minAckDeadline and maxAckDeadline. I could not find any migration docs.
If i want the "old" behavior, do i just set both to the same value?
But what is even the semantics of minAckDeadline? Why would anybody limit the minimum acknowledge time and resend the message if it was processed too fast?
In addition, there is no minAckDealine or maxAckDeadline visible in the GCP PubSub UI of a subscription. Only ackDeadline.
Currently a blocker not to upgrade to v5.0.0
@mscudlik Yeah, these are good questions. I wrote up a Medium post about the changes, but I didn't really cover the migration path for the ackDeadline stuff.
If you want to mimic the old behaviour of setting ackDeadline to a fixed value, as you said, just set minAckDeadline and maxAckDeadline to the same value.
The reason we have minAckDeadline is really about exactly-once delivery, but in general, these are guard rails that the library won't stray outside when determining how long to set the ack deadlines based on the 99th percentile calculations. So the deadlines won't be less than the time in minAckDeadline, and they won't be higher than maxAckDeadline. (You could process it and ack() any time up to the current deadline, that deadline just won't move outside the window specified.)
Does that make sense? If so, maybe I'll make another post for it.
In addition to that: why is this also not reflected in GCP UI and in https://github.com/googleapis/nodejs-pubsub/blob/main/protos/protos.d.ts#L4478 ?