Sign inSign up

ahmedemad2051/kafka-with-python

By ahmedemad2051

Updated over 6 years ago

Image
0

152

ahmedemad2051/kafka-with-python repository overview

Kafka With Python

Demo App for kafka with python

  • Two topics [input-output]
  • Producer publish to input topic
  • Consumer listen to input topic then count words
  • Producer publish words count to output topic

Installation

run new container interactively.

docker run -it --name kafka-python ahmedemad2051/kafka-with-python

In container start zookeeper service

service zookeeper start

In container start kafka server

kafka-server-start.sh /kafka/config/server.properties 

Usage

Publish producer message to input topic [you can change it from the container]

docker exec kafka-python python3 kafka_with_python/producer.py

Run consumer to get messages from input topic then get words count and send the counts to output topic

docker exec -it kafka-python python3 kafka_with_python/consumer.py

To get messages from output topic run [inside kafka-python container]

kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic output

Tag summary

Content type

Image

Digest

Size

377.3 MB

Last updated

over 6 years ago

docker pull ahmedemad2051/kafka-with-python