使用以下kafka config命令,我们可以将保留字节设置为1000000
TOPIC_NAME=test
kafka-configs --alter --zookeeper localhost:2181 --entity-type topics --entity-name $TOPIC_NAME --add-config retention.bytes=1000000
但是如何用相反的方法找到每个主题的保留字节呢?
可以使用description键
./kafka-configs --zookeeper localhost:2181 --describe --entity-type topics --entity-name test
修改后的属性被返回,否则它们是代理的默认属性。