Closed
Description
I'm new to Kafka and trying to understand offset management.
As far as I understand, a consumer group implicitly uses ZooKeeper to store offsets per partition. Are the starting offsets for partitions automatically set to 0 for each consumer group?
After initializing SimpleConsumer
, I tried to grab a message using kafka_consumer.get_message(get_partition_info=True)
, but it failed with the error message kafka failed with error code=1 (OFFSET OUT_OF_RANGE)
.
Do I need to explicitly set the starting offsets using kafka_consumer.seek(0, 0)
?