Unable to use Kafka

Hi,

I followed the instruction as mentioned in your Kafka video.

I was able to star the producer successfully. However i am getting the below error in my consumer and i am not receiving the messages sent by producer.

Using the ConsoleConsumer with old consumer is deprecated and will be removed in a future major release. Consider using the new consumer by passing [bootstrap-server] instead of [zookeeper].

Can you please help!.
thanks
arun

Thanks for your support Sandeep.

Its working now!!

These are the steps i followed
opened 2 windows ( one for producer and another for consumer)

  1. export PATH=$PATH:/usr/hdp/current/kafka-broker/bin in both the windows

  2. in the producer window
    2.1) created a topic with the following command
    kafka-topics.sh --create --zookeeper ip-172-31-35-141.ec2.internal:2181 --replication-factor 1 --partitions 1 --topic

2.2) start producer
kafka-console-producer.sh --broker-list ip-172-31-38-146.ec2.internal:6667 --topic

  1. in the consumer window

kafka-console-consumer.sh --zookeeper ip-172-31-35-141.ec2.internal:2181 --topic –from-beginning

and thats it!. you will receive in the consumer window what ever you type in the producer window.

1 Like