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: add support for exactly once subscriptions #1572

Merged
merged 36 commits into from
Sep 22, 2022

Conversation

feywind
Copy link
Collaborator

@feywind feywind commented May 31, 2022

Adds support for exactly-once delivery subscriptions. Please see the samples for information on how to interact with exactly-once subscriptions properly (specifically, using the *WithResponse() methods).

Other client library folks - Mahesh needs to review this, so please don't merge until that happens.

Fixes #1571 🦕

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: pubsub Issues related to the googleapis/nodejs-pubsub API. labels May 31, 2022
@feywind feywind added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 31, 2022
@feywind feywind closed this May 31, 2022
@product-auto-label product-auto-label bot added size: u Pull request is empty. and removed size: s Pull request size is small. labels May 31, 2022
feywind and others added 19 commits June 6, 2022 12:08
* feat: add 'with response' methods for acks, and save the response promises

* chore: fix slightly broken rebase

* chore: remove extra comment

* tests: update to bring mocks in line with current real code

* fix: also reject Promises on failure, and add tests
* feat: add 'with response' methods for acks, and save the response promises

* chore: fix slightly broken rebase

* chore: remove extra comment

* tests: update to bring mocks in line with current real code

* fix: also reject Promises on failure, and add tests

* feat: add processAckError to parse ErrorInfo

* fix: add unit tests and fix some found bugs
@feywind feywind reopened this Aug 16, 2022
@product-auto-label product-auto-label bot removed the size: u Pull request is empty. label Aug 16, 2022
@feywind feywind requested a review from a team as a code owner September 14, 2022 19:54
@feywind feywind added owlbot:run Add this label to trigger the Owlbot post processor. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Sep 14, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 14, 2022
src/ack-metadata.ts Outdated Show resolved Hide resolved
src/exponential-retry.ts Outdated Show resolved Hide resolved
src/message-queues.ts Outdated Show resolved Hide resolved
src/message-queues.ts Outdated Show resolved Hide resolved
src/message-queues.ts Outdated Show resolved Hide resolved
src/subscriber.ts Show resolved Hide resolved
src/subscriber.ts Show resolved Hide resolved
src/subscriber.ts Show resolved Hide resolved
src/subscriber.ts Outdated Show resolved Hide resolved
src/subscriber.ts Show resolved Hide resolved
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

@feywind
Copy link
Collaborator Author

feywind commented Sep 15, 2022

I'm tracking review changes over here: #1624

…ery (#1624)

* chore: add 'delivery' to 'exactly once'

* samples: also update sample names

* chore: more 'delivery'

* samples: delete renamed js samples

* fix: disable automatic gax retries on ack/modAck for EOS

* fix: also close out pending ack/modAck retries on subscriber close

* docs: better comments about what happens in failure cases

* docs: rename setAckDeadline to setStreamAckDeadline

* fix: improve comments on Message.ack/modAck/nack, and short-circuit the non-EOS case

* samples: add info about what happens when calling ackWithResponse with a non-EOS sub

* samples: also update js

* docs: remove extraneous sample links
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 21, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 21, 2022
samples/listenForMessagesWithExactlyOnceDelivery.js Outdated Show resolved Hide resolved
src/message-queues.ts Outdated Show resolved Hide resolved
@feywind feywind added automerge Merge the pull request once unit tests and other checks pass. owlbot:run Add this label to trigger the Owlbot post processor. labels Sep 22, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 22, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit 998de35 into main Sep 22, 2022
@gcf-merge-on-green gcf-merge-on-green bot deleted the exactly-once-main branch September 22, 2022 20:20
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Sep 22, 2022
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 googleapis/nodejs-pubsub API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for exactly-once subscriptions (EOS)
2 participants