Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pubsub)!: set max ack extension period to 60 minutes #3501

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

diegomarquezp
Copy link
Contributor

@diegomarquezp diegomarquezp commented Jan 24, 2025

  • Max ack extension period: we do not use a final variable storing the default value. We will instead build the library with a null value if not provided via beans, which will default to the core library's default value
  • Max executor threads: we do not use a final variable storing the default value. The global executor bean, which relied on this default value, was removed and will now use the defaults from the core library.

@diegomarquezp
Copy link
Contributor Author

Pubsub-bus failure is tracked in #3494

@diegomarquezp diegomarquezp marked this pull request as ready for review January 24, 2025 20:27
@diegomarquezp diegomarquezp requested a review from a team as a code owner January 24, 2025 20:27
Copy link
Member

@meltsufin meltsufin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of setting the default, can we just not set the property and automatically expose the default already configured in Pub/Sub client library?

@diegomarquezp
Copy link
Contributor Author

Instead of setting the default, can we just not set the property and automatically expose the default already configured in Pub/Sub client library?

@meltsufin See https://github.com/googleapis/java-pubsub/blob/855653f1ae37c4c45600d2ef0c34e1804939e75a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java#L96-L105
The clients don't have these defaults publicly exposed. Should we propose this change in pubsub?

@meltsufin
Copy link
Member

Why do you need access to the default property in Pub/Sub? You shouldn't need to use it directly. If you don't set it in DefaultSubscriberFactory.createSubscriber, the default will be used. The way to make sure it's not set, is to keep our value null. null -> default.

this removes the global executor configuration since it relied on a hardcoded default value
@diegomarquezp
Copy link
Contributor Author

@meltsufin PTAL. We are now passing null values to build the subscriber. However, I found that the global executor bean became unnecessary since it defaults to the static values we are getting rid of. Not sure if there is a use case where a custom global executor with other values satisfies a special need?

@meltsufin meltsufin requested a review from jinseopkim0 January 31, 2025 17:52
Copy link
Member

@meltsufin meltsufin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be documentation updates corresponding to this too.

It looks like you included changes for DEFAULT_EXECUTOR_THREADS as well. Would it make sense to do it in a separate PR? Was it part of the original request?

@diegomarquezp
Copy link
Contributor Author

There should be documentation updates corresponding to this too.

It looks like you included changes for DEFAULT_EXECUTOR_THREADS as well. Would it make sense to do it in a separate PR? Was it part of the original request?

@meltsufin I double checked. There seems to not be a hard requirement on default threads (i.e. "the really important is max ack..."). I restricted this PR to only include the default max ack extension period updates and changed the docs accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants