i want to view topic level properties something like

"message.timestamp.type": "LogAppendTime","cleanup.policy":"compact"

is it possible to view what all properties is set at topic level?is there any command where i can view my topic level properties as mentioned above i google lot and found a cmd but its not work for me

cmd is as follow

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

Best Answer


An alternative could be

bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic test

that lists some basic information about the provided Kafka topic, along with all non-default configurations (Configs) on topic-level. For example,

Topic:my-topic PartitionCount:1 ReplicationFactor:3 Configs: compression.type=gzip,segment.bytes=1073741824,retention.ms=100,max.message.bytes=100001200,delete.retention.ms=100000Topic: my-topic Partition: 0 Leader: 1 Replicas: 1,2,0 Isr: 1,2,0

It would be helpful to know why you think kafka-configs script is not working.Remember that the script only print the configurations with a non default value.

If the script only prints something like:

Configs for topic 'test' are

Probably, the topic configuration has not been changed.

If you are familiar with docker, i recommend you to run a containerwith landoop/kafka-topics-ui image.https://hub.docker.com/r/landoop/kafka-topics-ui/

It is a usefull docker image that shows all the data of the topics, messages, offsets, configurations ...

Here you can see and example of configuration view:

enter image description here