Navigation Menu

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
merged 2 commits into from Jun 25, 2021

Conversation

tmdiep
Copy link
Contributor

@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 requested review from a team as code owners June 25, 2021 04:55
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 25, 2021
@product-auto-label product-auto-label bot added the api: pubsublite Issues related to the Pub/Sub Lite API. label Jun 25, 2021
@tmdiep tmdiep merged commit ae34396 into googleapis:master Jun 25, 2021
@tmdiep tmdiep deleted the contexts branch June 25, 2021 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsublite Issues related to the Pub/Sub Lite API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants