- To have started Kafka using Docker Compose as showed in the lab 02-eCommerce_microservices
- On the host, to have mapped localhost and kafka to 127.0.0.1, for example
$ echo "127.0.0.1 kafka localhost" | sudo tee -a /etc/hosts)
Install dependencies
$ pip install -r requirements.txt
Start consumer
$ python kafka-consumer.py --config_file consumer.conf
Produce messages
$ python kafka-producer.py --config_file producer.conf
In the case you want to consume from the beginning of the topic/partition
$ python kafka-consumer.py --config_file consumer.conf --reset