You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 13, 2026. It is now read-only.
pubsub: expose a max_duration_per_lease_extension setting for subscribers #35
For languages that support lease management, we have bound the percentile distribution to 10s - 10m. It would be useful if the upper bound were configurable.
A user might process messages very slowly (8m to ack)
If the application fails 5s after receiving a message (whose ack deadline was set to 8m, because that's the deadline the percentile distribution gave), the user has to wait 7m55s for the message to be redelivered
Users should be able to set max_duration_per_lease_extension = 20s, which caps an individual modAck RPC to 20s. This would have the downside of causing more modack RPCs to be sent, but the upside that the redelivery time would only be 15s
This setting differs from max_lease_duration, which defines the total amount of time we'll hold a message.
In addition, max_duration_per_lease_extension should be disabled if <=0, and should default to 0.
@pradn, yes, I'm taking a look at ack_deadline() property and I don't see where _last_histogram_size value is changed. This attribute represents the size of the histogram on the last ack_deadline call, right?
changed the title [-]pubsub: expose a max_extension_period setting for subscribers[/-][+]pubsub: expose a max_duration_per_lease_extension setting for subscribers[/+]on Feb 28, 2020
Activity
IlyaFaer commentedon Feb 21, 2020
@pradn, that was me, who did this for Go, and, if you don't mind, I'll do this for Python as well
pradn commentedon Feb 21, 2020
@IlyaFaer Sounds good, Ilya. Reach out if you have any questions.
IlyaFaer commentedon Feb 25, 2020
@pradn, yes, I'm taking a look at
ack_deadline()property and I don't see where_last_histogram_sizevalue is changed. This attribute represents the size of the histogram on the lastack_deadlinecall, right?I found only two places, where it's used:
python-pubsub/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py
Line 111 in 380cb38
python-pubsub/google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py
Line 194 in 380cb38
Am I missing something, or
targetin here will always be equal to 100? Looks like something that needs to be fixed (I think, I'll push it by the way)[-]pubsub: expose a max_extension_period setting for subscribers[/-][+]pubsub: expose a max_duration_per_lease_extension setting for subscribers[/+]hongalex commentedon Feb 28, 2020
Hey @IlyaFaer, we finalized the naming for all languages and updated the original issue. Please update when you get the chance.
IlyaFaer commentedon Mar 2, 2020
@hongalex, @pradn, okay, it's done