GeezerVison is showing github.com (truncated) — pubsub: GetSubscription only once by pongad · Pull Request #2127 · googleapis/google-cloud-java
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.
cc @davidtorres
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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**.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please write a test for this change to make sure we call get subscription only one per subscriber that gets initialized.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
* 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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Coverage increased (+0.006%) to 81.198% when pulling 6faac7c on pongad:one-get into 7c20c6f on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
@@ -225,6 +226,7 @@ public void enqueuePullResponse(PullResponse response) { |
|
|
@Override
|
|
|
public void getSubscription(
|
|
|
GetSubscriptionRequest request, StreamObserver<Subscription> responseObserver) {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
@@ -225,6 +226,7 @@ public void enqueuePullResponse(PullResponse response) { |
|
|
@Override
|
|
|
public void getSubscription(
|
|
|
GetSubscriptionRequest request, StreamObserver<Subscription> responseObserver) {
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Changes Unknown when pulling 4936754 on pongad:one-get into ** on GoogleCloudPlatform:master**.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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>
|