InterviewSolution
Saved Bookmarks
| 1. |
What is an offset in Kafka? What are the different ways to commit an offset? Where does Kafka maintain offset? |
|
Answer» As we already know, a Kafka topic is divided into partitions. The data inside each partition is ordered and can be accessed using an offset. Offset is a position within a partition for the next message to be SENT by the consumer. There are TWO types of offsets maintained by Kafka: Current Offset
Committed Offset
There are two ways to commit an offset:
Prior to Kafka v0.9, Zookeeper was being used to store topic offset, however from v0.9 ONWARDS, the information regarding offset on a topic’s partition is stored on a topic called _consumer_offsets. |
|