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

Add shutdown options for the client classes #1917

Open
feywind opened this issue May 2, 2024 · 4 comments
Open

Add shutdown options for the client classes #1917

feywind opened this issue May 2, 2024 · 4 comments
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@feywind
Copy link
Collaborator

feywind commented May 2, 2024

We are planning to add updates to the close() methods to allow for a more deterministic shutdown process. This will take care of issues like these:

#1860
#1856
#1665
#1648

The three options boil down to this:

  • Wait for everything to finish dequeuing
  • Bail immediately (and maybe return IDs of things that were pending)
  • Nack everything in the queue and wait for those to send
@feywind feywind added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. labels May 2, 2024
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label May 2, 2024
@modestaspruckus
Copy link

modestaspruckus commented Sep 27, 2024

Hey, any update on this, when it's planned to have proper close method?

@mcasarrubios
Copy link

Hi @feywind, is there a time estimate planned for this? This is something we need to be able to do a graceful shutdown.
Thanks in advance

@mcasarrubios
Copy link

For us, the ideal solution would be this point ‘Wait for everything to finish dequeuing’.

@feywind
Copy link
Collaborator Author

feywind commented Nov 15, 2024

@mcasarrubios Thanks for the input. Right now you can already do the basic "wait for dequeue" using these methods:

  • subscriber.close()
  • topic.flush()

The extra thing we want to add is allowing options for how to handle outstanding data (e.g. drop everything on the floor and quit immediately).

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. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants