Skip to content

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

Open
@pof-declaneaston

Description

@pof-declaneaston

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?

Metadata

Metadata

Labels

api: pubsubIssues related to the googleapis/python-pubsub API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions