Skip to content

Conversation

@michaelpri10
Copy link
Contributor

Implements subscriber shutdown options for the Java client library. This provides more control over the shutdown process:

  • The subscriber stream is closed immediately.
  • If the behaviour is set to NACK_IMMEDIATELY, then all buffered messages are nacked, and the timeout specifies how long to wait for them to go through.
  • If the behaviour is set to WAIT_FOR_PROCESSING, then the remaining message machinery continues until the timeout is almost up, and then it switches to NACK_IMMEDIATELY.
  • If the timeout is zero, everything closes down immediately, as quickly as possible.

chore: Format and cleanup sample

chore: Remove hardcoded version from samples pom.xml
@michaelpri10 michaelpri10 requested review from a team as code owners September 30, 2025 20:58
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: pubsub Issues related to the googleapis/java-pubsub API. labels Sep 30, 2025
feywind
feywind previously approved these changes Oct 3, 2025
Copy link

@feywind feywind left a comment

Choose a reason for hiding this comment

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

The logic looks good! I don't know as much about the Java library specifics, but I didn't see anything weird.

@michaelpri10 michaelpri10 merged commit 8195f6f into googleapis:main Oct 7, 2025
25 checks passed
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 googleapis/java-pubsub API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants