Install And Configure Apache Kafka, Java and ZooKeeper
sudo apt-get update -y
sudo apt-get upgrade -yBefore installing Kafka, you will need to install Java, add this repository
sudo add-apt-repository -y ppa:webupd8team/javaNext, update the metadata of the new repository and install JDK 8
sudo apt-get update
sudo apt-get install oracle-java8-installer -ysudo apt-get install zookeeperdwget https://www-eu.apache.org/dist/kafka/2.1.1/kafka_2.11-2.1.1.tgz If not work, download latest binary of apache kafka from Kafka official site
Next, create a directory for Kafka installation
sudo mkdir /opt/Kafka
cd /opt/KafkaExtract the downloaded archive using tar command in /opt/Kafka
sudo tar -xvf kafka_2.11-2.1.1.tgz -C /opt/Kafka/Make Sure Server is Running
sudo /opt/Kafka/kafka_2.11-2.1.1/bin/kafka-server-start.sh /opt/Kafka/kafka_2.11-2.1.1/config/server.propertiesNow create a sample topic with name "testing"
sudo /opt/Kafka/kafka_2.11-2.1.1/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic testingNow create environment and install Kafka-Python, Open-CV and Flask Server
pip install -r requirements.txtLets run Producer
python producer.py Consumer
python consumer.pyNow Browse this http://localhost:5000/
Credit
