Can multiple Kafka consumers read from the same partition of same topic by default? By default, I mean since group.id is not mandatory I am wondering if I spawn multiple kafka consumers without specifying any group.id and give them the same topic and partition name will they be able to read from the same partition? I understand that If I give different group names for each Kafka consumer then all the consumers can read from the same partition.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Can multiple Kafka consumers read from the same partition of same topic by default?
Yes.
By default, I mean since group.id is not mandatory I am wondering if I spawn multiple kafka consumers without specifying any group.id and give them the same topic and partition name will they be able to read from the same partition?
Yes.
You can look at https://kafka.apache.org/documentation/#consumerconfigs for default values for consumer properties.
标签:
apache-kafka