Kafka 消费者 - 轮询会带来一个分区的记录吗?

Kafka consumers - poll will bring the records from one partition?

正如问题的标题所说,我有一个消费者组 CG 与 C1 , C2 。还有一个有 5 个分区的主题。

C1 -> P1,P2,P3 C2 -> P4,P5

当 C1 通过 poll() 请求记录时,在单次迭代中,它是从它订阅的所有分区(在本例中为 P1、P2、P3)还是从一个分区中获取记录?

"If a consumer is assigned multiple partitions to fetch data from, it will try to consume from all of them at the same time, effectively giving these partitions the same priority for consumption."

此答案直接取自此处的 Apache Kafka 文档 - https://kafka.apache.org/25/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html。标题是消费流控制。