Skip to content

feat: Add Consumer Groups With Partition Assignment - #12

Merged
ThomasHartDev merged 2 commits into
mainfrom
thomas/feat/consumer-groups
Sep 4, 2026
Merged

feat: Add Consumer Groups With Partition Assignment#12
ThomasHartDev merged 2 commits into
mainfrom
thomas/feat/consumer-groups

Conversation

@ThomasHartDev

Copy link
Copy Markdown
Owner

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

@ThomasHartDev
ThomasHartDev force-pushed the thomas/feat/consumer-groups branch from ffaa3aa to d80d0bf Compare September 4, 2026 19:31
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
ThomasHartDev force-pushed the thomas/feat/consumer-groups branch from d80d0bf to e7e57f4 Compare September 4, 2026 19:39
@ThomasHartDev
ThomasHartDev merged commit b043214 into main Sep 4, 2026
@ThomasHartDev
ThomasHartDev deleted the thomas/feat/consumer-groups branch September 4, 2026 19:39
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.

Consumer groups with partition assignment

1 participant