简体   繁体   English

Flink-Kafka消费者涉及多个主题

[英]Flink-Kafka consumers for multiple topics

I have a Flink Kafka consumer which reads from multiple kafka-topics(3 in my case). 我有一个Flink Kafka使用者,它从多个kafka-topics中读取(本例中为3)。 There are 5 partitions per topic on kafka. 卡夫卡上每个主题有5个分区。 How many consumers does Flink create by default. Flink默认创建多少个使用者。

Is it: 是吗:

  1. 5 consumers per topic. 每个主题5个消费者。 ie. 即。 in all 15 consumers 在所有15位消费者中
  2. 5 consumers in all. 共有5位消费者。

The consumption of kafka messages is very slow, So I am not able to figure the number of consumers attached to each topic. kafka消息的消耗非常缓慢,因此我无法确定每个主题所涉及的消费者数量。

The number of consumers is equal to the parallelism of the source function. 使用者的数量等于源函数的并行度。 There is only one consumer for each parallel instance of the source operator. 源运算符的每个并行实例只有一个使用者。 If you've left the parallelism unconfigured, I think it might default to a parallelism of one, which would certainly explain the slowness. 如果您没有配置并行机制,那么我认为它可能默认为并行机制之一,这肯定可以解释它的缓慢性。

If you're running a standalone cluster, the webGUI will show you the parallelism of your source function while it's running. 如果您正在运行独立集群,则webGUI将向您显示源函数在运行时的并行性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM