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

Use returnImmediately=false and disable timeouts for pullAsync #1387

Merged
merged 2 commits into from
Nov 11, 2016

Conversation

mziccard
Copy link
Contributor

No description provided.

@mziccard mziccard added the api: pubsub Issues related to the Pub/Sub API. label Nov 10, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 10, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 84.25% when pulling c78723b on mziccard:return-immediately-false into 6383cc1 on GoogleCloudPlatform:master.

@mziccard
Copy link
Contributor Author

This fixes #1157

/cc @garrettjonesgoogle @aozarov care to have a look?

@garrettjonesgoogle
Copy link
Member

LGTM

PullRequest request = PullRequest.newBuilder().setReturnImmediately(true)
.setSubscription(
SubscriberApi.formatSubscriptionName(getOptions().getProjectId(), subscription))
.setMaxMessages(maxMessages)
.setReturnImmediately(true)
.setReturnImmediately(returnImmediately)

This comment was marked as spam.

This comment was marked as spam.

@aozarov
Copy link
Contributor

aozarov commented Nov 10, 2016

Looks good to me. One minor comment.

Also, another suggestion that even I am not too keen about (as it typically frown upon) but still would like to mention. Did you consider adding a finalize to this Future to "cancel" the request if was not completed and finalized?

@mziccard
Copy link
Contributor Author

Did you consider adding a finalize to this Future to "cancel" the request if was not completed and finalized?

Do you think this would be a good choice? I wouldn't rely on finalize in general and I also don't want to give users the impression that they can rely on it to do the cleanup. As a matter of fact the service timeouts the request after 90seconds and returns an empty list of messages, so the request will not stay around forever.

@aozarov
Copy link
Contributor

aozarov commented Nov 10, 2016

As a matter of fact the service timeouts the request after 90seconds and returns an empty list of messages, so the request will not stay around forever.

Perfect! Then surely there is no need for such (pretty lame) guard.

Feel free to merge after removing the redundant setReturnImmediately

@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 84.25% when pulling 3ef4781 on mziccard:return-immediately-false into 6383cc1 on GoogleCloudPlatform:master.

@mziccard mziccard merged commit 8ec721e into googleapis:master Nov 11, 2016
github-actions bot pushed a commit that referenced this pull request Jun 21, 2022
…9.1 (#1387)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.119.0` -> `1.119.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.1/compatibility-slim/1.119.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.119.1/confidence-slim/1.119.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer).
github-actions bot pushed a commit that referenced this pull request Jun 21, 2022
🤖 I have created a release *beep* *boop*
---


## [2.2.4](googleapis/java-bigquerydatatransfer@v2.2.3...v2.2.4) (2022-06-13)


### Dependencies

* update dependency com.google.cloud:google-cloud-bigquery to v2.13.2 ([#1388](googleapis/java-bigquerydatatransfer#1388)) ([5366270](googleapis/java-bigquerydatatransfer@5366270))
* update dependency com.google.cloud:google-cloud-pubsub to v1.119.1 ([#1387](googleapis/java-bigquerydatatransfer#1387)) ([578c028](googleapis/java-bigquerydatatransfer@578c028))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this pull request Oct 5, 2022
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants