beginnerProducer & Consumer Internals

Why does a Kafka consumer track its own 'offset' instead of the broker tracking what each consumer has read?

Storing the offset with the consumer (in an internal Kafka topic, `__consumer_offsets`) lets each consumer group track its own independent read position on the same topic, and lets a consumer resume exactly where it left off after a restart or rebalance — the broker doesn't need to know or care which consumers exist, keeping it simpler and more scalable.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to Why design a system around a producer/consumer split (e.g. an inventory-update producer and a search-index consumer) instead of one service doing everything?← Back to all Kafka & Microservices questions