TH
thoo/kafka_tutorial_in_python
This is a tutorial to understand how to use kafka in python on Mac OS X.
This tutorial is set up on Mac OS X using homebrew installation. In theory, it should work on other platforms.
Prerequisites
You will need to install kafka and kafka-python by running the following.
brew install kafka
pip install kafka_pythonThen start the service through homebrew.
brew services start zookeeper
brew services start kafkaprducer.ipynb : This demonstrate how to create a topic, how to set the number of partition and how to send a message through kafka.
consuemr.ipynb : This demonstrates how to subscribe to a topic. This also displays how the order is preserved within a partition even though it is not guaranteed in a topic.