问题
At the very first consuming, my consumer is consuming the same message twice, this only happens at the first consuming, after that it only consumes once.
Attaching the consumer conf code below. please check for the corrections
def __init__(self, group_id, topic='default', bootstrap_servers=
['localhost:9092']):
self.topic = topic
self.bootstrap_servers = bootstrap_servers
self.group_id = group_id
self.consumer = KafkaConsumer(## Heading ##
self.topic,
bootstrap_servers=self.bootstrap_servers,
auto_offset_reset='earliest',
enable_auto_commit=True,
group_id=self.group_id,
value_deserializer=lambda x: loads(x.decode('utf-8')))
来源:https://stackoverflow.com/questions/56287899/consumer-consuming-the-same-message-twice-at-the-starting-only