我有一个包含3个节点的合流kafka集群,我使用kafka python连接到 Kafka
和消费。
我的 index.py
文件:
cid = "_" + str(randint(1, 99999999))
consumer = KafkaConsumer('test', bootstrap_servers=['109.XXX.XXX.XXX:9092', '5.XXX.XXX.XXX:9092', '88.XXX.XXX.XXX:9092'], group_id='my_group_id', client_id=cid, auto_offset_reset='earliest')
for msg in consumer:
logger.warning(msg.value)
我负责 index.py
文件三次,所以我有3个消费者的消费者组,每个消费者在一个分区中接收消息,一切正常。
当 Topic
完成后,2消费者遇到此警告,并且只有一个消费者连接到主题。
警告信息:
[2018-07-10 12:32:38] (kafka.coordinator.consumer) WARNING : Auto offset commit failed for group my_group_id: CommitFailedError: Commit cannot be completed since the group has already
rebalanced and assigned the partitions to another member.
This means that the time between subsequent calls to poll()
was longer than the configured max_poll_interval_ms, which
typically implies that the poll loop is spending too much
time message processing. You can address this either by
increasing the rebalance timeout with max_poll_interval_ms,
or by reducing the maximum size of batches returned in poll()
with max_poll_records.
为什么会出现此消息?我变了 max_poll_interval_ms
但问题没有解决。
暂无答案!
目前还没有任何答案,快来回答吧!