0
votes

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....

1
wrap your command with ` ` ... that will show it like a command. :) - Rafaf Tahsin
also share the log text not the image. :) - Rafaf Tahsin
try the actual IP address instead of localhost. For me, for some reason localhost did not work. Also check the configs if the listening ports are set correctly for broker and zookeeper. - faadi

1 Answers

2
votes

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.