This simple project is an example of how to use Kafka Consumers and Producers.
Install requirements:
sudo zypper in python-pip
make initConfigure:
cp configuration.env .env
vim .env # Make any changes neededTest:
make testwebsiteCheck.pyis an example how to use theWebsite-class to meassure websites and how to publish the results via theWCKafka-module to an existing Kafka instance.websiteConsumer.pyis an example how to use theDatabase-class to add results to a PostgreSQL database. It also shows how to check and obtain new messages from an existing Kafka instance via theWCKafka-module.
python3 websiteCheck.py # Runs the Kafka Producer and checks the websites
python3 websiteConsumer.py # Runs the Kafka Consumer and submits entries to the DB