Kafka, Java, Interview, Coding, Microservices.
Kafka automatically rebalances partitions to maintain balanced load. Example: Imagine a Consumer Group with 2 consumers (Consumer A and Consumer B) subscribed to a topic with 3 partitions.Kafka might distribute the partitions as follows: Consumer A: Listens to Partitions 0 and 1 Consumer B: Listens