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

Call "activate_ordering_keys" After Callback Instead of After Ack #1181

Open
pof-declaneaston opened this issue May 31, 2024 · 0 comments
Open
Assignees
Labels
api: pubsub Issues related to the googleapis/python-pubsub API.

Comments

@pof-declaneaston
Copy link

We are building an subscriber app where we want messages from the same user should be delivered to the same machine while previous messages from that user are being processed, while still being delivered in order.

PubSub gives us ordering and subscriber affinity, but the way message ordering is implemented in the client stops us from receiving messages until we ack, which we don't want to do until processing is done (for correctness and to keep subscriber affinity).

In the original message ordering PR there was a discussion about how the "activate_ordering_keys" function could be called after the callback instead of after acking the message. I would like to apply that change so that we can have messages delivered right away.

I would be happy to make a PR although I will probably have to talk to my manager about licensing. I drafted it out in this branch main...pof-declaneaston:python-pubsub:feature/next_message_after_callback.

Please let me know if this is an acceptable change and if I am on the right track with my coding. Should I make this behaviour configurable for backwards compatibility?

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label May 31, 2024
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/python-pubsub API.
Projects
None yet
Development

No branches or pull requests

2 participants