Kafka commands

Tuesday, May 22, 2018

Kafka commands



*** Kafka home directory is "/usr/hdp/current/kafka" OR "/usr/hdp/current/kafka-broker"
*** All kafka scripts are located in "/usr/hdp/current/kafka/bin" OR "/usr/hdp/current/kafka-broker/bin"

Kafka Status
Command : kafka status


Kafka create topic
Command : ./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 13 --topic entechlog_test0001


Kafka list topic
Command : kafka-topics.sh --list --zookeeper localhost:2181


Kafka console producer
Command : ./kafka-console-producer.sh --broker-list localhost:6667 --topic entechlog_test0001
OR
Command : ./kafka-console-producer.sh --broker-list localhost:6667 --topic entechlog_test0001 --security-protocol SASL_PLAINTEXT

Kafka console consumer
command : ./kafka-console-consumer.sh --zookeeper localhost:2181 --from-beginning --topic entechlog_test0001
OR
Command : ./kafka-console-consumer.sh --bootstrap-server localhost:6667 --topic entechlog_test0001 --from-beginning
OR
Command : ./kafka-console-consumer.sh --bootstrap-server localhost:6667 --topic entechlog_test0001 --from-beginning --security-protocol SASL_PLAINTEXT


No comments

Post a Comment

Error 404

The page you were looking for, could not be found. You may have typed the address incorrectly or you may have used an outdated link.

Go to Homepage