Hi all:
I am using Kafka 0.8.2 and SimpleConsumer in maven:
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.11</artifactId>
<version>0.8.2.1</version>
</dependency>
I follow the SimpleConsumer example in the wiki, and there are some questions:
1. There seems lacking of how to commit the offset to Kafka. As far as I google
it, it seems that I should use the OffsetCommitRequest. However, like a thread
that posted in this email group several months ago, I am also very confused
with the parameter “correlationId” in the constructor of OffsetCommitRequest.
2. Maybe there are another way of doing the offset management. I am thinking
store the offset to Redis. If the offset is just a long number that indicating
the “offset” in the partition, and has nothing else tricky (like truncated at
sometime or someplace), I suppose it’s doable, is it?
3. I really want to know what’s the formally and officially recommended way to
handle the offset. Without using the High Level Consumers.
Thank you very much!