---
source: https://iinventedlight.com/library/notes/kafka-consumer-groups.md
title: "Share a Kafka topic among consumers with consumer groups"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Apache Kafka docs); Apache-2.0 (Apache Kafka source); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Apache Kafka docs, Design; Apache Kafka source, GroupCoordinator.java. Apache-2.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-20
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-20
as_of: 2026-11-20
confidence: medium
untested: "Not reproduced (2026-11-20). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: Apache Kafka consumer groups"
tags: ["kafka", "consumer-groups", "rebalance", "coordinator"]
client: Librarian
sources:
  - id: S1
    title: "Design"
    publisher: "Apache Kafka docs"
    url: https://kafka.apache.org/44/design/design/
    accessed: 2026-11-20
    license: "Apache-2.0"
  - id: S2
    title: "GroupCoordinator.java"
    publisher: "Apache Kafka source"
    url: https://raw.githubusercontent.com/apache/kafka/trunk/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinator.java
    accessed: 2026-11-20
    license: "Apache-2.0"
---
# Share a Kafka topic among consumers with consumer groups
**Answer:** A group coordinator allocates entity ids to members of a consumer group and drives rebalance. Share groups exist as another group type alongside traditional consumer groups. GroupCoordinator includes a heartbeat to a Consumer Group.

## Partitions and membership

This partitioning style is explicitly designed to allow locality-sensitive processing in consumers. The client controls which partition it publishes messages to. The rebalance protocol relies on the group coordinator to allocate entity ids to group members. Those generated ids are ephemeral; they change if members restart and later rejoin.

Static membership aims to keep group membership unchanged based on those ids, thus no rebalance will be triggered. The unit of replication is the topic partition.

| group coordinator | rebalance |
|---|---|
| allocate entity ids | membership changes |
| Consumer Group heartbeat | GroupCoordinator |
| share groups | alongside traditional consumer groups |

## Coordinator and share groups

`GroupCoordinator` is a public interface. One method is a heartbeat to a Consumer Group. Another method is Join a Classic Group. There is also Leave a Classic Group, and List Groups.

However, some traditional messaging workloads are not a good fit for consumer groups. Share groups exist alongside those traditional groups and have their own heartbeat. A broker configuration property, `group.share.partition.max.record.locks`, controls a share-group limit.

## See also

- [kafka-partitions](https://iinventedlight.com/library/notes/kafka-partitions/)
- [kafka-transactions](https://iinventedlight.com/library/notes/kafka-transactions/)

## Claims

- id: C1
  claim: The rebalance protocol relies on the group coordinator to allocate ids to members.
  source: S1
  evidence: "The rebalance protocol relies on the group coordinator to allocate entity ids to group members."

- id: C2
  claim: Share groups exist alongside traditional consumer groups.
  source: S1
  evidence: "Share groups are another type of group, existing alongside traditional consumer groups."

- id: C3
  claim: GroupCoordinator exposes a heartbeat call for a consumer group.
  source: S2
  evidence: "Heartbeat to a Consumer Group."

## Sources

- [S1] Design. Apache Kafka docs. https://kafka.apache.org/44/design/design/ . License: Apache-2.0. Accessed 2026-11-20.

- [S2] GroupCoordinator.java. Apache Kafka source. https://raw.githubusercontent.com/apache/kafka/trunk/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinator.java . License: Apache-2.0. Accessed 2026-11-20.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Apache Kafka docs, Design; Apache Kafka source, GroupCoordinator.java. Apache-2.0. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
