fix(pubsub/v2): respect ShutdownBehavior when handling timeout#13021
Merged
hongalex merged 1 commit intogoogleapis:mainfrom Oct 3, 2025
Merged
fix(pubsub/v2): respect ShutdownBehavior when handling timeout#13021hongalex merged 1 commit intogoogleapis:mainfrom
hongalex merged 1 commit intogoogleapis:mainfrom
Conversation
Member
|
Thanks for the PR. This was originally part of the implementation, but I had dropped it at some point when debugging another issue. Looks good to me. |
hongalex
approved these changes
Oct 2, 2025
feywind
approved these changes
Oct 2, 2025
Previously, messages were always nacked when a positive shutdown timeout was set. This change ensures that messages are only nacked if ShutdownBehavior is explicitly set to NackImmediately.
3f8ebbd to
741bdf5
Compare
hongalex
pushed a commit
that referenced
this pull request
Oct 3, 2025
🤖 I have created a release *beep* *boop* --- ## [2.2.0](pubsub/v2/v2.1.0...pubsub/v2/v2.2.0) (2025-10-03) ### Features * **pubsub/v2:** Support the protocol version in StreamingPullRequest ([#12985](#12985)) ([4e8c9d5](4e8c9d5)) ### Bug Fixes * **pubsub/v2:** Respect ShutdownBehavior when handling timeout ([#13021](#13021)) ([0135d93](0135d93)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously,
ShutdownOptions.Behaviorwas never respected — when a positiveTimeoutwas set, messages were always nacked. This PR fixes the shutdown logic so that messages are only nacked ifBehavioris explicitly set toShutdownBehaviorNackImmediately. This makes theBehaviorfield effective as intended.related to #12829