You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
The streaming pull future's cancel() is non-blocking. If subscriber client is used as a context manager that closes the underlying channel, but the client does not block when shutting down the stream (e.g. it just calls future.cancel()), the channel can be closed before the subscriber sends the last requests to the server (e.g. auto NACK of any remaining messages).
The block below is common in the existing samples:
withsubscriber:
try:
# When `timeout` is not set, result() will block indefinitely,# unless an exception occurs first.streaming_pull_future.result(timeout=timeout)
exceptTimeoutError:
streaming_pull_future.cancel()
The samples should demonstrate how to block before leaving the with block, but they currently do no, and users have observed errors on shutdown (example). This should be fixed.