<reponame>Carduin/IUT<filename>LP-PROG/UE 5 - SIG & Big Data/TP REDIS/redis-pubsub.py
import redis
redis = redis.Redis(host='172.17.0.2', port=6379)
pubsub = redis.pubsub()
pubsub.subscribe(['my-messages'])
for item in pubsub.listen():
    print(item)

5 - SIG & Big Data/TP REDIS/redis-pubsub.py
import redis
redis = redis.Redis(host='172.17.0.2', port=6379)
pubsub = redis.pubsub()
pubsub.subscribe(['my-messages'])
for item in pubsub.listen():
    print(item)