Kafka consumer problem error

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

{metadata.broker.list:7903=dppublish2.dev.bmocm.com,dppublish2.dev.bmocm.com:7903, request.timeout.ms=30000, client.id=console-consumer-54542, security.protocol=PLAINTEXT}
{metadata.broker.list:7903=dppublish2.dev.bmocm.com,dppublish2.dev.bmocm.com:7903, request.timeout.ms=30000, client.id=console-consumer-54542, security.protocol=PLAINTEXT}
{metadata.broker.list:7903=dppublish2.dev.bmocm.com,dppublish2.dev.bmocm.com:7903, request.timeout.ms=30000, client.id=console-consumer-54542, security.protocol=PLAINTEXT}
{metadata.broker.list:7903=dppublish2.dev.bmocm.com,dppublish2.dev.bmocm.com:7903, request.timeout.ms=30000, client.id=console-consumer-54542, security.protocol=PLAINTEXT}
{metadata.broker.list:7903=dppublish2.dev.bmocm.com,dppublish2.dev.bmocm.com:7903, request.timeout.ms=30000, client.id=console-consumer-54542, security.protocol=PLAINTEXT}
{metadata.broker.list:7903=dppublish2.dev.bmocm.com,dppublish2.dev.bmocm.com:7903, request.timeout.ms=30000, client.id=console-consumer-54542, security.protocol=PLAINTEXT}

These messages are keep on going. I forcefully ran a command to stop this.

Are you using your custom producer/consumer? Or Kafka-console-producer/kafka-console consumer?

Hi Pratyush,

Thanks for reply. I am using kafka-console producer as well as consumer.

Can you paste the command lines you used for running zookeeper,kafka brokers, producer and consumer?

I will send you the details now.

This is to check whether Zookeeper has broker ids:

[zk: cmtxxxxxxxxxxxxxxxxxxxxxxxxx81/DPBroker(CONNECTED) 0] ls /brokers/ids
[0, 1]
[zk: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1/DPBroker(CONNECTED) 1]

This is the command I used for producer:

bin/kafka-console-producer.sh --broker-list cmxxxxxxxxxxxxxxx.com:6667 --topic test21

This is the command I used for Consumer:

bin/kafka-console-consumer.sh --zookeeper cmtxxxxxxxxxxxxxxxxxxxxxxxxxxxxxom:2181/DPBroker --topic test21 --from-beginning

Then, this consumer console keeps on giving some msg linke in attached file. I is not stopping. I forced to stop it.

I just tried producing msg from console, and the consumer consumes and show on console.

Please let me know if you need further details. Thanks.