kafka describe topic code example

Example 1: kafkacat topic info

kafkacat -b localhost:29092 -t "new_topic" -L

Example 2: kafka create topic

#Kafka docker create topic
create-topics.sh --zookeeper <hostname>:<port> \
    --topic <topic-name> \
    --partitions <number-of-partitions> \
    --replication-factor <number-of-replicating-servers>

Example 3: kafka-topics.sh --bootstrap-server multi server

bin/kafka-console-consumer.sh --bootstrap-server localhost:9092,localhost:9093,localhost:9094 --from-beginning --topic my-replicated-topic

Tags:

Misc Example