Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pubsublite): wire user context to api clients #4318

merged 2 commits into from Jun 25, 2021


Copy link

@tmdiep tmdiep commented Jun 25, 2021

Passes the context provided for New(Publisher|Subscriber)Client through to gapic clients. This will allow users to pass through a cancelable context, which they can use to quickly terminate the publisher and subscriber clients. This will give users more options to handle various scenarios (e.g. force immediate shutdown, hanging clients).

It was originally not passed through to ensure that we can perform graceful shutdown (e.g. flush pending published. messages, commit cursors, etc), but there are situations where attempts to connect to the server can have long delays.

All other libraries just pass the context provided to the NewClient constructors through to the gapic clients, so we'll be consistent.

@tmdiep tmdiep merged commit ae34396 into googleapis:master Jun 25, 2021
4 checks passed
@tmdiep tmdiep deleted the contexts branch Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants