Consumer Groups and Rebalancing
Understand how Kafka consumer groups scale consumption, how partitions are assigned, and what happens during a rebalance, with Spring Kafka in mind.
Why Consumer Groups?
A consumer group lets multiple consumer instances share the work of reading a topic. Kafka assigns each partition to exactly one consumer in the group.
Group ID
Consumers join a group by sharing a group.id. Kafka tracks the offset position per group, so each group reads the topic independently.
spring.kafka.consumer.group-id=order-serviceAll lessons in this course
- Kafka Architecture Overview
- Topics, Partitions, and Offsets
- Setting up Local Kafka with Docker
- Consumer Groups and Rebalancing