I am getting an error while reading a topic from a single node cluster
kafka-console-producer.bat -- broker-list localhost:9092 -- topic raja
Error below
Missing required argument "[topic]"
kafka version-kafka_2.13-2.4.0
I am getting an error while reading a topic from a single node cluster
kafka-console-producer.bat -- broker-list localhost:9092 -- topic raja
Error below
Missing required argument "[topic]"
kafka version-kafka_2.13-2.4.0
You've got a space between the parameter labels, so it won't work. Also note consumer
not producer
if you're reading from the topic.
Try:
kafka-console-consumer.bat --broker-list localhost:9092 --topic raja
Ref: https://kafka.apache.org/documentation/#quickstart_consume
I suggest you do more research and training.
You use kafka CONSUMER to read from a topic, NOT PRODUCER,
and also, as @Robin Moffatt mentioned while I was typing the answer,
remove spaces between the parameter labels:
kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic raja
This should work.
If you want to read the topic from the beginning then add this as well:
--from-beginning