Manikanta Katta
Manikanta Katta

Reputation: 11

Kafka:consumer not consuming messages from commandline

D:\Softwares\kafka\kafka_2.10-0.10.0.1\bin\windows>kafka-console-consumer.bat --zookeeper localhost:2181 --topic sampletopic

I used above command to consume the messages, is there anything I have missed? Help me on:

enter image description here

this

enter image description here

those are producer and consumer....

Upvotes: 0

Views: 1353

Answers (1)

snowleopard
snowleopard

Reputation: 833

This is on Windows 10

I know this is very old but in case someone else comes in here looking for an answer, the issue could be that kafka-console-consumer.bat is empty as it was for me. I was doing

.\bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic myTopic

and nothing would happen in the command line, same as to the person who asked this question, until I figured out the script file I'm trying to run has nothing in it. I found someone else who had theirs intact and just copied and pasted the contents in.

I don't understand how this file got empty but at some point, I couldn't get a topic to be released after I had deleted it and had tried a lot of things to fix this and perhaps this is when somehow that script file got cleared out.

Upvotes: 2

Related Questions