Can you please help with the step by step process of starting the Kafka broker on cloudx lab ?
also adding the dependent jar files to run the producer and consumer
Hi, @Pankaj_Bodhale
Here are the compiled steps on running Kafka.
Create your own topic, for instance I have used the topic name as “satyajitdas”
- export PATH=$PATH:/usr/hdp/current/kafka-broker/bin
- kafka-topics.sh --create --zookeeper cxln1.c.thelab-240901.internal:2181 --replication-factor 1 --partitions 1 --topic satyajitdas
- kafka-topics.sh --list --zookeeper cxln1.c.thelab-240901.internal:2181
- kafka-console-producer.sh --broker-list cxln4.c.thelab-240901.internal:6667 --topic satyajitdas
#kafka-console-producer.sh --broker-list cxln4.c.thelab-240901.internal:6667 --topic satyajitdas
- ls /brokers/ids -to get the ids of
cxln1.c.thelab-240901.internal
- kafka-console-consumer.sh --zookeeper cxln1.c.thelab-240901.internal:2181 --topic satyajitdas --from-beginning
All the best!