How to find the retention bytes per topic

Viewed 93

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 ?

1 Answers

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.

Related