Skip to content

Emit GROUP_JOIN event on stale partition assignments - #937

Merged
Nevon merged 4 commits into
masterfrom
emit-group-join-on-stale-assignment
Nov 2, 2020
Merged

Emit GROUP_JOIN event on stale partition assignments#937
Nevon merged 4 commits into
masterfrom
emit-group-join-on-stale-assignment

Conversation

@Nevon

@Nevon Nevon commented Nov 2, 2020

Copy link
Copy Markdown
Collaborator

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

Comment thread src/consumer/consumerGroup.js Outdated

@JaapRood JaapRood left a comment

Copy link
Copy Markdown
Collaborator

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