A consumer group is a set of consumers sharing a group.id that split a topic's partitions among themselves, so each partition is read by exactly one member of the group
A consumer group is how Kafka scales consumption and lets multiple applications read the same data independently. Every consumer that sets the same group.id belongs to the same group. Kafka assigns each partition of the subscribed topics to exactly one member of the group at a time, so the members divide the work without processing the same record twice. A different group.id is a completely independent group: it gets its own full copy of the stream and tracks its own offsets. That is how billing, analytics and fraud services can all read the orders topic without affecting each other.
Mechanically, one broker acts as the group coordinator for each group. It tracks membership through heartbeats and stores committed offsets per group, topic and partition in the internal __consumer_offsets topic. In the classic protocol, when membership changes, one member (the group leader) computes the assignment using a partition assignor and the coordinator distributes it. The important consequence is that the group, not the individual consumer, is the unit that owns a position in the log. If a member dies, another member takes over its partitions and resumes from the last committed offset.
Trade-off: a group gives automatic load sharing and failover, but parallelism is capped by the partition count, and any membership change triggers coordination work (a rebalance).
Alternative: manual assign() skips group management entirely. You control partitions yourself and get no automatic failover. I use it for tools, replay jobs, or when I need a fixed partition mapping.
Common mistake: thinking two consumers in the same group both receive every record. Within a group each record goes to one member; to broadcast, use different group IDs.
Common mistake: thinking a group is tied to a topic. A group can subscribe to many topics, and one topic can be read by many groups.
Common mistake: reusing a group.id across unrelated applications. They will silently split partitions and offsets between each other.
Version note: Kafka 4.0 makes the KIP-848 consumer group protocol generally available (group.protocol=consumer), moving assignment to the broker. The group concept is the same, but older clusters and clients use the classic protocol described above, so state which one you mean.
0-2 years experience
2-5 years experience
5-8 years experience
8+ years experience