Skip to content

pubsub: GetSubscription only once#2127

Merged
pongad merged 6 commits intogoogleapis:masterfrom
pongad:one-get
Jun 22, 2017
Merged

pubsub: GetSubscription only once#2127
pongad merged 6 commits intogoogleapis:masterfrom
pongad:one-get

Conversation

@pongad
Copy link
Copy Markdown
Contributor

@pongad pongad commented Jun 8, 2017

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

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.
@pongad pongad requested a review from garrettjonesgoogle June 8, 2017 11:48
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 8, 2017
@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling c98ccbe on pongad:one-get into ** on GoogleCloudPlatform:master**.

Copy link
Copy Markdown

@davidtorres davidtorres left a 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.

* 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.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.006%) to 81.198% when pulling 6faac7c on pongad:one-get into 7c20c6f on GoogleCloudPlatform:master.

@pongad
Copy link
Copy Markdown
Contributor Author

pongad commented Jun 16, 2017

@davidtorres Sorry for the delay. PTAL

@@ -225,6 +226,7 @@ public void enqueuePullResponse(PullResponse response) {
@Override
public void getSubscription(
GetSubscriptionRequest request, StreamObserver<Subscription> responseObserver) {

This comment was marked as spam.

@@ -225,6 +226,7 @@ public void enqueuePullResponse(PullResponse response) {
@Override
public void getSubscription(
GetSubscriptionRequest request, StreamObserver<Subscription> responseObserver) {

This comment was marked as spam.

@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 4936754 on pongad:one-get into ** on GoogleCloudPlatform:master**.

@pongad pongad merged commit bbfb6db into googleapis:master Jun 22, 2017
@pongad pongad deleted the one-get branch June 22, 2017 00:16
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants