python3 -m venv .env
source .env/bin/activate
pip install -r requirements.txt
python publisher.py
This will publish a message every second to the Redis stream.
Open two separate terminal windows and run:
python consumer_1.py
python consumer_2.py
Each consumer will consume messages from the stream.
- Ensure that Redis is running before executing the scripts.
- The consumers will receive the same messages separately.