Skip to content

feat(pubsub): Support subscriber shutdown options - #36480

Merged
aandreassa merged 1 commit into
pubsub-shutdown-stream-inventoryfrom
pubsub-shutdown-options
Sep 10, 2026
Merged

aandreassa merged 1 commit into
pubsub-shutdown-stream-inventoryfrom
pubsub-shutdown-options

Conversation

@aandreassa

Copy link
Copy Markdown
Contributor

Supports :shutdown_behavior and :shutdown_timeout options when listening for messages on a subscriber:

  1. Added shutdown_behavior: (:wait_for_processing, :nack_immediately) and shutdown_timeout: arguments to Subscriber#listen and MessageListener.new.
  2. Added parameter validation for shutdown options in MessageListener.
  3. Coordinated stream stop and inventory wait across streams in MessageListener#stop! and #wait!.
  4. Added unit tests in message_listener_test.rb and listen_test.rb.
  5. Added end-to-end acceptance tests in async_test.rb verifying live :nack_immediately and :wait_for_processing behaviors.

@aandreassa
aandreassa changed the base branch from main to pubsub-shutdown-stream-inventory August 28, 2026 00:13
@aandreassa
aandreassa force-pushed the pubsub-shutdown-options branch from d9a60e0 to 0569232 Compare August 28, 2026 00:38
@aandreassa
aandreassa marked this pull request as ready for review August 28, 2026 16:54
@aandreassa
aandreassa requested review from a team and yoshi-approver as code owners August 28, 2026 16:54
@aandreassa
aandreassa requested a review from torreypayne August 28, 2026 16:54
Comment thread google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb
Comment thread google-cloud-pubsub/lib/google/cloud/pubsub/message_listener.rb
@aandreassa
aandreassa force-pushed the pubsub-shutdown-options branch from 0569232 to 79c3595 Compare August 28, 2026 21:58
@aandreassa
aandreassa force-pushed the pubsub-shutdown-options branch from 79c3595 to bb7541b Compare August 31, 2026 23:13
Supports `:shutdown_behavior` and `:shutdown_timeout` options when listening for messages on a subscriber:

1. Added `shutdown_behavior:` (`:wait_for_processing`, `:nack_immediately`) and `shutdown_timeout:` arguments to `Subscriber#listen` and `MessageListener.new`.
2. Added parameter validation for shutdown options in `MessageListener`.
3. Coordinated stream stop and inventory wait across streams in `MessageListener#stop!` and `#wait!`.
4. Added unit tests in `message_listener_test.rb` and `listen_test.rb`.
5. Added end-to-end acceptance tests in `async_test.rb` verifying live `:nack_immediately` and `:wait_for_processing` behaviors.
@aandreassa
aandreassa force-pushed the pubsub-shutdown-options branch from bb7541b to 0822541 Compare September 10, 2026 20:59
@aandreassa
aandreassa merged commit 70cd955 into main Sep 10, 2026
30 of 31 checks passed
@aandreassa
aandreassa deleted the pubsub-shutdown-options branch September 10, 2026 21:30
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.

3 participants