Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.
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

Closed

Description

@hongalex

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.

Activity

  1. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on Feb 21, 2020
  2. IlyaFaer commented on Feb 21, 2020

    @IlyaFaer

    @pradn, that was me, who did this for Go, and, if you don't mind, I'll do this for Python as well

  3. pradn commented on Feb 21, 2020

    @pradn
    Contributor

    @IlyaFaer Sounds good, Ilya. Reach out if you have any questions.

  4. self-assigned this
    on Feb 25, 2020
  5. IlyaFaer commented on Feb 25, 2020

    @IlyaFaer

    @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?

    I found only two places, where it's used:


    target = min([self._last_histogram_size * 2, self._last_histogram_size + 100])

    Am I missing something, or target in here will always be equal to 100? Looks like something that needs to be fixed (I think, I'll push it by the way)

  6. 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
  7. hongalex commented on Feb 28, 2020

    @hongalex
    MemberAuthor

    Hey @IlyaFaer, we finalized the naming for all languages and updated the original issue. Please update when you get the chance.

  8. IlyaFaer commented on Mar 2, 2020

    @IlyaFaer

    @hongalex, @pradn, okay, it's done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the googleapis/python-pubsub API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions