Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(pubsub/v2): respect ShutdownBehavior when handling timeout#13021

Merged
hongalex merged 1 commit into
googleapis:maingoogleapis/google-cloud-go:mainfrom
kurochan:pubsubv2-shutdown-behaviorkurochan/google-cloud-go:pubsubv2-shutdown-behaviorCopy head branch name to clipboard
Oct 3, 2025
Merged

fix(pubsub/v2): respect ShutdownBehavior when handling timeout#13021
hongalex merged 1 commit into
googleapis:maingoogleapis/google-cloud-go:mainfrom
kurochan:pubsubv2-shutdown-behaviorkurochan/google-cloud-go:pubsubv2-shutdown-behaviorCopy head branch name to clipboard

Conversation

@kurochan

@kurochan kurochan commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Previously, ShutdownOptions.Behavior was never respected — when a positive Timeout was set, messages were always nacked. This PR fixes the shutdown logic so that messages are only nacked if Behavior is explicitly set to ShutdownBehaviorNackImmediately. This makes the Behavior field effective as intended.

related to #12829

@kurochan
kurochan requested a review from shollyman as a code owner October 2, 2025 05:08
@kurochan
kurochan requested review from a team October 2, 2025 05:08
@product-auto-label product-auto-label Bot added the api: pubsub Issues related to the Pub/Sub API. label Oct 2, 2025
@hongalex

hongalex commented Oct 2, 2025

Copy link
Copy Markdown
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 hongalex added the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 2, 2025
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label 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.
@kurochan
kurochan force-pushed the pubsubv2-shutdown-behavior branch from 3f8ebbd to 741bdf5 Compare October 3, 2025 01:44
@kurochan
kurochan requested a review from a team October 3, 2025 01:44
@hongalex hongalex added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 3, 2025
@hongalex
hongalex enabled auto-merge (squash) October 3, 2025 17:30
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 3, 2025
@hongalex
hongalex merged commit 0135d93 into googleapis:main Oct 3, 2025
77 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.