__consumer_offsets 主题在使用 zookeeper 和 bootstrap-server 描述时显示不同的配置

huangapple go评论72阅读模式
英文:

__consumer_offsets topic showing different configuration when describe with zookeeper and bootstrap-server

问题

以下是翻译后的内容:

使用 --bootstrap-server 选项时

./kafka-topics.sh --bootstrap-server kafka-broker:9092 --describe --topic __consumer_offsets

主题:__consumer_offsets       分区数:50      复制因子:3    配置:compression.type=producer,min.insync.replicas=1,cleanup.policy=compact,segment.bytes=104857600,retention.ms=60000,message.format.version=0.10.2-IV0,file.delete.delay.ms=30000,unclean.leader.election.enable=true,retention.bytes=132070253,delete.retention.ms=30000,segment.ms=3600000

使用 --zookeeper 选项时

./kafka-topics.sh --zookeeper zookeeper-host:2181/asrkafka --describe --topic __consumer_offsets

主题:__consumer_offsets       分区数:50      复制因子:3    配置:compression.type=producer,cleanup.policy=compact,segment.bytes=104857600
英文:

Kafka version - 2.4.0
I am using kafka-topics.sh script to describe __consumer_offsets topic with below 2 options

  • --bootstrap-server
  • --zookeeper ( which is DEPRECATED)

Both of them showing different replication factor and configuration of the topic..

Could any one help here to understand why this behaviors. Many thanks for your help.

When using --bootstrap-server

./kafka-topics.sh --bootstrap-server kafka-broker:9092 --describe --topic __consumer_offsets

Topic: __consumer_offsets       PartitionCount: 50      ReplicationFactor: 3    Configs: compression.type=producer,min.insync.replicas=1,cleanup.policy=compact,segment.bytes=104857600,retention.ms=60000,message.format.version=0.10.2-IV0,file.delete.delay.ms=30000,unclean.leader.election.enable=true,retention.bytes=132070253,delete.retention.ms=30000,segment.ms=3600000

When using --zookeeper

./kafka-topics.sh --zookeeper zookeeper-host:2181/asrkafka --describe --topic __consumer_offsets

Topic: __consumer_offsets       PartitionCount: 50      ReplicationFactor: 3    Configs: compression.type=producer,cleanup.policy=compact,segment.bytes=104857600

答案1

得分: 1

非Zookeeper选项使用AdminClient API,该API会拉取存储在经纪人设置中的额外主题元数据,而不仅仅存储在Zookeeper中。

英文:

The non-Zookeeper option uses the AdminClient API which pulls additional topic metadata that is stored in the broker settings rather than only in Zookeeper.

huangapple
  • 本文由 发表于 2020年9月5日 18:02:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/63752688.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定