Skip to content

m-ata/Kafka_message_broker_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka Implementation using Python as the message broker.

Overview

This project demonstrates a simple Kafka-based messaging system using Python. It includes a producer and consumer setup to simulate data flow.

Files

  • main.py: Kafka producer that sends messages.
  • consumer.py: Kafka consumer that receives messages.
  • requirements.txt: Project dependencies.
  • pyproject.toml: Project configuration.
  • .python-version: Python version used.
  • README.md: Project documentation.

Setup

1. Install and Run Dependencies

pip install -r requirements.txt
 docker run -p 2181:2181 zookeeper
docker run -p 9092:9092 -e KAFKA_ZOOKEEPER_CONNECT=192.168.2.103:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://192.168.2.103:9092 -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 confluentinc/cp-kafka

2. Run Programs

python main.py
python consumer.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages