Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
499 views
in Technique[技术] by (71.8m points)

apache kafka - How to find the retention bytes per topic

we the following kafka config command we can set the retention bytes to 1000000

TOPIC_NAME=test

kafka-configs --alter --zookeeper localhost:2181  --entity-type topics  --entity-name $TOPIC_NAME --add-config retention.bytes=1000000

but how to do the opposite way to find the retention bytes per topic ?

question from:https://stackoverflow.com/questions/65881081/how-to-find-the-retention-bytes-per-topic

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can use describe key

./kafka-configs --zookeeper localhost:2181  --describe --entity-type topics --entity-name test

The altered properties are returned, otherwise they are default from the broker.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...