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

Emit GROUP_JOIN event on stale partition assignments #937

Merged
merged 4 commits into from Nov 2, 2020

Conversation

Nevon
Copy link
Collaborator

@Nevon Nevon commented Nov 2, 2020

Doing this, it occurs to me that GROUP_JOIN is not exactly the right name for this event. It's more like REBALANCED or GROUP_STABLE or something, as it implies that the consumer has not only joined the group but also gone through the synchronization barrier.

Regardless, the join + sync is moved into the consumer group instead of living in the runner, and the join and sync methods become private so that we don't have the same issue again somewhere else.

Fixes #923

src/consumer/consumerGroup.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@JaapRood JaapRood left a comment

Choose a reason for hiding this comment

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

Haven't ran it, but looks good to me.

Regarding the naming of GROUP_JOIN: you're right that this is more about the rebalance, but more problematic than that is it being an instrument event rather than a first class API on the consumer. If we want to enable exactly-once processing, it's required, as to be able to deal with the sync barrier correctly see a comment on an related issue and slack conversation about it.

None of that should block merging this fix, but something to keep in mind when planning to make changes in that area 🙂.

@Nevon Nevon merged commit 81d04bc into master Nov 2, 2020
@Nevon Nevon deleted the emit-group-join-on-stale-assignment branch November 2, 2020 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding Partitions Didn't Trigger Group Join Event
3 participants