import time
import zmq

context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.connect("tcp://localhost:5555")

while True:
    try:
        socket.send_multipart([b"hello", b"word"])
        time.sleep(5)
        print("send")
    except Exception as e:
        print(e)

