Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

kafka consumer error saying timeout without reading

Highlighted

kafka consumer error saying timeout without reading

Explorer

Hi there,

I am trying to run kafka. I am seeing zookeeper and kafka brokers are running. I could create topics. I ran zkCli to get broker id's and it shows [0.1] as broker ids. I ran kafka producer and it runs well. I tried consumer to consume msg from producer(just in command line). The consumer neither shows error nor consume msgs. Here I have attached the consumer console page. Please let me know what the issue is.. Thanks.consumererror.png @amankumbare , @Frank Lu @Ravi Mutyala

3 REPLIES 3

Re: kafka consumer error saying timeout without reading

Expert Contributor

can you share your command for your consumer?

bin/kafka-console-consumer.sh --zookeeper yourZookeeperHost:2181 --topic yourTopicName --from-beginning

Re: kafka consumer error saying timeout without reading

Explorer

The exact same command like you have mentioned.

Re: kafka consumer error saying timeout without reading

Contributor

Consumer will consume messages if you are producing messages in the same topic at the same time.

If you want to see the messages which were produced earlier you will need to pass --from-beginning flag to consumer command

Don't have an account?
Coming from Hortonworks? Activate your account here