Oh My Algorithm
Concept GuidePartition Assignment · Parallel Consumption

Consumer Group

A consumer group is how several consumers split one topic between them. Within a group each partition is assigned to exactly one consumer, so adding consumers raises throughput — until you pass the partition count, at which point the extras sit idle. Each consumer commits offsets for the partitions it owns, and a different group reads the same data on its own independent schedule.

01 Concept at a Glance

Interactive Step-by-Step
Consumer Group · Assignment & Offsets
Partition 0
e1
0
e4
1
e7
2
e9
3
4
5
Partition 1
e2
0
e5
1
e8
2
3
4
5
Partition 2
e3
0
e6
1
2
3
4
5

Records are already sitting in three partitions. Now for who reads that log, and how they split it.

Logic Node1 / 11

02 Understand It Simply

For Everyone
🔑Analogy

Like staff dividing up warehouse aisles. One person per aisle means no collisions; more people than aisles means someone has nothing to do. A different team can walk the same aisles at their own pace without disturbing the first.

💡In Plain Words

Inside a group, partitions are assigned exclusively, which makes the partition count the ceiling on parallelism.

Each consumer commits the offset it has processed, so restarting resumes from there.

When a consumer joins or leaves, a rebalance recalculates the assignment — and consumption pauses briefly while it happens.

Groups with different IDs never interfere; each reads the same log at its own offsets.

📍Where It's Used
  • Matching consumer count to partition count
  • scaling out throughput
  • choosing an offset-commit strategy (at-least-once vs at-most-once)
  • and fanning the same data out to multiple uses

03 Frequently Asked Questions

FAQ
What is Consumer Group?+

A consumer group is how several consumers split one topic between them. Within a group each partition is assigned to exactly one consumer, so adding consumers raises throughput — until you pass the partition count, at which point the extras sit idle. Each consumer commits offsets for the partitions it owns, and a different group reads the same data on its own independent schedule.

Where is Consumer Group used?+

Matching consumer count to partition count, scaling out throughput, choosing an offset-commit strategy (at-least-once vs at-most-once), and fanning the same data out to multiple uses.

What's a simple analogy for Consumer Group?+

Like staff dividing up warehouse aisles. One person per aisle means no collisions; more people than aisles means someone has nothing to do. A different team can walk the same aisles at their own pace without disturbing the first.

Guide Progress0%