【发布时间】:2019-05-14 04:07:04
【问题描述】:
当我运行这个命令时,我得到 2 个主题。我知道我创建了测试主题,但我看到了一个名为“__consumer_offsets”的附加主题。 顾名思义就是和消费者的offset有关,但是具体是怎么使用的呢?
$ bin/kafka-topics.sh --list --zookeeper localhost:2181
__consumer_offsets
test
$ bin/kafka-topics.sh --describe --zookeeper localhost:2181
Topic:__consumer_offsets PartitionCount:50 ReplicationFactor:1 Configs:segment.bytes=104857600,cleanup.policy=compact,compression.type=producer
Topic: __consumer_offsets Partition: 0 Leader: 0 Replicas: 0 Isr: 0
Topic: __consumer_offsets Partition: 1 Leader: 0 Replicas: 0 Isr: 0
*
*
*
Topic: __consumer_offsets Partition: 48 Leader: 0 Replicas: 0 Isr: 0
Topic: __consumer_offsets Partition: 49 Leader: 0 Replicas: 0 Isr: 0
这发生在 Kafka 1.1.0 以及为什么有 50 个分区。 还在寻找一种禁用此功能的方法,因为每次我尝试运行“描述”主题时,它首先打印 __consumer_offsets 的 50 个分区,然后打印我的主题。
【问题讨论】:
-
链接stackoverflow.com/questions/39529511/… 部分解决了这个问题。我什至没有看到 _schema 主题。
标签: apache-kafka