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

feat(pubsub): add option to override subscription #10327

Merged

Conversation

coryan
Copy link
Member

@coryan coryan commented Nov 29, 2022

For historical reasons, a pubsub::SubscriberConnection has a subscription assigned to it. With this change that subscription becomes the default, and one can provide an override via the Options argument.

Motivated by #10320 and #9171


This change is Reviewable

For historical reasons, a `pubsub::SubscriberConnection` has a
subscription assigned to it.  With this change that subscription becomes
the default, and one can provide an override via the `Options` argument.
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Nov 29, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: ee9647cc2e61b13e7fe01cacf66a3bf1a01d37fe

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Base: 93.84% // Head: 93.85% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (f109369) compared to base (c043c8b).
Patch coverage: 98.42% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##             main   #10327    +/-   ##
========================================
  Coverage   93.84%   93.85%            
========================================
  Files        1596     1596            
  Lines      145150   145312   +162     
========================================
+ Hits       136220   136380   +160     
- Misses       8930     8932     +2     
Impacted Files Coverage Δ
google/cloud/pubsub/subscription.cc 87.50% <0.00%> (-12.50%) ⬇️
google/cloud/pubsub/subscription.h 100.00% <ø> (ø)
...pubsub/internal/subscriber_connection_impl_test.cc 97.86% <98.78%> (+0.75%) ⬆️
...loud/pubsub/internal/subscriber_connection_impl.cc 95.34% <100.00%> (ø)
...ogle/cloud/pubsub/internal/subscription_session.cc 95.53% <100.00%> (ø)
...cloud/pubsub/internal/subscription_session_test.cc 98.16% <100.00%> (+0.17%) ⬆️
google/cloud/pubsub/subscriber_connection.cc 70.90% <100.00%> (+2.28%) ⬆️
...integration_tests/schema_admin_integration_test.cc 98.88% <0.00%> (-1.12%) ⬇️
...ud/spanner/integration_tests/client_stress_test.cc 84.86% <0.00%> (+0.65%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@coryan coryan marked this pull request as ready for review November 29, 2022 19:06
@coryan coryan requested a review from a team as a code owner November 29, 2022 19:06
* Override the default subscription for a request.
*
* Some applications need to receive messages from multiple subscriptions. In
* these case they can use this option to override the default
Copy link
Contributor

Choose a reason for hiding this comment

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

s/these case/these cases/ or /this case/

* Override the default subscription for a request.
*
* Some applications need to receive messages from multiple subscriptions. In
* these case they can use this option to override the default
Copy link
Contributor

Choose a reason for hiding this comment

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

s/$/./

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: f109369fa0138b77256a2b5519809a1b8e5b522e

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan enabled auto-merge (squash) November 29, 2022 20:18
@coryan coryan merged commit 7af5754 into googleapis:main Nov 29, 2022
@coryan coryan deleted the feat-pubsub-override-default-subscription branch November 30, 2022 14:41
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 Pub/Sub API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants