pubsub: GetSubscription only once#2127
Merged
pongad merged 6 commits intogoogleapis:masterfrom Jun 22, 2017
pongad:one-get
Merged
pubsub: GetSubscription only once#2127pongad merged 6 commits intogoogleapis:masterfrom pongad:one-get
pongad merged 6 commits intogoogleapis:masterfrom
pongad:one-get
Conversation
Previous each subscriber connection makes one GetSubscription call to get subscription detail. This spams the service with many Get requests, that will likely all return the same information. This PR makes Subscriber call Get only once, before starting all connections. Fixes #2111.
|
Changes Unknown when pulling c98ccbe on pongad:one-get into ** on GoogleCloudPlatform:master**. |
davidtorres
reviewed
Jun 9, 2017
davidtorres
left a comment
There was a problem hiding this comment.
Can you please write a test for this change to make sure we call get subscription only one per subscriber that gets initialized.
| * Implementation of {@link AckProcessor} based on Cloud Pub/Sub pull and acknowledge operations. | ||
| */ | ||
| final class PollingSubscriberConnection extends AbstractApiService implements AckProcessor { | ||
| static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(10); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Contributor
Author
|
@davidtorres Sorry for the delay. PTAL |
davidtorres
approved these changes
Jun 21, 2017
| @@ -225,6 +226,7 @@ public void enqueuePullResponse(PullResponse response) { | |||
| @Override | |||
| public void getSubscription( | |||
| GetSubscriptionRequest request, StreamObserver<Subscription> responseObserver) { | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| @@ -225,6 +226,7 @@ public void enqueuePullResponse(PullResponse response) { | |||
| @Override | |||
| public void getSubscription( | |||
| GetSubscriptionRequest request, StreamObserver<Subscription> responseObserver) { | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Changes Unknown when pulling 4936754 on pongad:one-get into ** on GoogleCloudPlatform:master**. |
chingor13
pushed a commit
that referenced
this pull request
Feb 20, 2026
🤖 I have created a release *beep* *boop* --- ## [2.37.2](https://togithub.com/googleapis/java-bigquerystorage/compare/v2.37.1...v2.37.2) (2023-05-30) ### Bug Fixes * Pass the parameter value of enableConnectionPool instead of true always ([#2096](https://togithub.com/googleapis/java-bigquerystorage/issues/2096)) ([253678d](https://togithub.com/googleapis/java-bigquerystorage/commit/253678df630c717fbcf7018b3245aa56b5f22660)) ### Dependencies * Update dependency com.google.cloud:google-cloud-bigquery to v2.26.0 ([#2114](https://togithub.com/googleapis/java-bigquerystorage/issues/2114)) ([8b44534](https://togithub.com/googleapis/java-bigquerystorage/commit/8b4453476b17dcbb10faaa52c6a2b06506d89d62)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.26.1 ([#2128](https://togithub.com/googleapis/java-bigquerystorage/issues/2128)) ([62afd46](https://togithub.com/googleapis/java-bigquerystorage/commit/62afd46bb4cad09886c49bac88a2052c8754f8fe)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.10.1 ([#2121](https://togithub.com/googleapis/java-bigquerystorage/issues/2121)) ([3fabc5d](https://togithub.com/googleapis/java-bigquerystorage/commit/3fabc5d467becd3d9b816f9545e8a1e6dd09f682)) * Update dependency com.google.http-client:google-http-client to v1.43.2 ([#2109](https://togithub.com/googleapis/java-bigquerystorage/issues/2109)) ([0d57daf](https://togithub.com/googleapis/java-bigquerystorage/commit/0d57daff0d113089ba1957753febeed92024e4c2)) * Update dependency com.google.truth:truth to v1.1.4 ([#2126](https://togithub.com/googleapis/java-bigquerystorage/issues/2126)) ([a0be7ad](https://togithub.com/googleapis/java-bigquerystorage/commit/a0be7ad59b1604972b190befe2e4befd2e2c6431)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 23, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous each subscriber connection makes one GetSubscription
call to get subscription detail.
This spams the service with many Get requests,
that will likely all return the same information.
This PR makes Subscriber call Get only once,
before starting all connections.
Fixes #2111.
cc @davidtorres