Skip to content

Serverless Data Platform: Creating a Kafka producer.py, consumer.py & PgAdmin SQL DB

Notifications You must be signed in to change notification settings

hanydief/Kafka_Producer_Consumer_to_SQL_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka_Producer_Consumer_to_SQL_Project

Creating a Kafka producer.py, consumer.py & PgAdmin SQL DB

Required installations if not existing on the same environment:

  • pip install kafka-python
  • conda install -c conda-forge kafka-python
  • conda install -c anaconda sqlalchemy
  • conda install -c anaconda psycopg2

What the project about:

  • Created Upstash account
  • Created New single replica Cluster
  • producer.py Python base code

KafkaProducer_upstash

  • On VS created a producer.py to publish random message to Kafka every 5 seconds

kafkaProducer_VS

  • consumer.py Python base code

KafkaConsumer_upstash

  • On VS created a consumer.py to fitch the producer.py random messages from Kafka every 2 seconds

kafkaConsumer_VS

  • After activating the environment: $ conda activate kafka-env
  • On GitBash: $ python producer.py

kafkaProducer_GitBash

  • After activating the environment: $ conda activate kafka-env
  • On GitBash: $ python consumer.py

kafkaConsumer_GitBash

  • using engine Pushing all produced data thru consumer.py to PgAdmin SQL Database

kafkaConsumer_PGAdmin_SQL

Benificial links:

https://upstash.com/?gclid=CjwKCAjwvpCkBhB4EiwAujULMu611BMTjPj1328j0xQ8lKUNu55HbCBBtwRG8ysGnVgpFEML33sTRxoCWcMQAvD_BwE https://pypi.org/project/psycopg2-binary/

About

Serverless Data Platform: Creating a Kafka producer.py, consumer.py & PgAdmin SQL DB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages