卡夫卡新手。使用 confluent-kafka python 库通过手动提交处理消费者代码。以下输出中的 offset=%s 是什么意思
Config: turned off the auto commit, and commented out auto.offset.rest:earliest
#'auto.offset.reset': 'earliest',
'enable.auto.commit': False}
topics = consumer.list_topics(topic='sample-topic')
partitions = [TopicPartition(topic_name, partition) for partition in list(topics.topics[topic_name].partitions.keys())]
offset_per_partition = consumer.position(partitions)
print(offset_per_partition)``
output:
[TopicPartition{topic=sample-topic,partition=%I32d,offset=%s,error=%s}]