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 ReassignmentHandler which is notified on client reassignment #242

Merged
merged 3 commits into from Sep 16, 2021

Conversation

dpcollins-google
Copy link
Collaborator

This enables clients to respond to a reassignment by cancelling outstanding actions and nacking all messages.

This enables clients to respond to a reassignment by cancelling outstanding actions and nacking all messages.
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 15, 2021
@product-auto-label product-auto-label bot added the api: pubsublite Issues related to the googleapis/python-pubsublite API. label Sep 15, 2021
class ReassignmentHandler(ABC):
"""
A ReassignmentHandler is called any time a new partition assignment is received from the server.
It will be called with both the previous and new assignments as decided by the backend.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto comments from the Java PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied over the docstring changes- python unfortunately cannot implement the stronger semantics around message delivery, but I've documented this.

@dpcollins-google dpcollins-google added automerge Merge the pull request once unit tests and other checks pass. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Sep 16, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 16, 2021
@dpcollins-google dpcollins-google added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 16, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 16, 2021
@dpcollins-google dpcollins-google merged commit 80fd5f6 into main Sep 16, 2021
@dpcollins-google dpcollins-google deleted the reassignment_handler branch September 16, 2021 14:43
@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 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsublite Issues related to the googleapis/python-pubsublite API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants