Hi Team,
I have been doing kafka hands on. Was able to successfully get single messages across successfully as instructed in the lessons. When I use linux yes command to send lots of message both consumer and producer hangs and it return back saying insufficient memory…Steps that I have followed:
-
Included kafka binaries
export PATH=$PATH:/usr/hdp/current/kafka-broker/bin -
Created the topic - alokdeosingh1995
kafka-topics.sh --create --zookeeper ip-172-31-20-247.ec2.internal:2181 --replication-factor 1 --partitions 1 --topic alokdeosingh1995 -
Checked if topic was created
kafka-topics.sh --list --zookeeper ip-172-31-20-247.ec2.internal:2181 | grep alokdeosingh1995 -
Finding the ip address of any broker
ip-172-31-20-247.ec2.internal:6667 -
Starting the producer and attaching it to broker
kafka-console-producer.sh --broker-list ip-172-31-20-247.ec2.internal:6667 --topic alokdeosingh1995 -
Starting the consumer
kafka-console-consumer.sh --zookeeper ip-172-31-20-247.ec2.internal:2181 --topic alokdeosingh1995 --from-beginning
This is what happens: