feat: Add Consumer Groups With Partition Assignment - #12
Merged
Conversation
ThomasHartDev
force-pushed
the
thomas/feat/consumer-groups
branch
from
September 4, 2026 19:31
ffaa3aa to
d80d0bf
Compare
Split the log into partitions, hash keys with FNV-1a, and assign each partition to one member of a consumer group using range or round-robin. Offsets live on the group so a rebalance continues from the last commit.
Pin rebalance keys to partitions 0/1 and require the successor not to see the already-committed payload. Cover last-member leave and a throw that stalls only one partition.
ThomasHartDev
force-pushed
the
thomas/feat/consumer-groups
branch
from
September 4, 2026 19:39
d80d0bf to
e7e57f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kafka scales a topic by splitting the log into partitions and giving each partition to one member of a consumer group. This adds a partitioned topic, FNV-1a key hashing so a key always lands on the same partition, and a group that rebalances with range or round-robin assignment.
Offsets live on the group, not the member, so a join or leave hands the partition to a peer at the last committed offset. Two groups on the same topic each see every record. Two members never share a partition, so a successful record is not delivered to a peer.
The package barrel also re-exports DeadLetterQueue and withDeadLetter. The dead-letter tests already import them from src/index, so the public entry has to match.
Closes #11