This commit is contained in:
2021-04-25 12:16:11 +02:00
parent 31405d08bc
commit 435cb07f63
2 changed files with 38 additions and 0 deletions

17
zmq/publisher.py Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env python3
import itertools
import sys
import zmq
context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://127.0.0.1:5559")
try:
while True:
msg_body = "a" * m
socket.send_string(f"test {msg_body}")
except Exception:
socket.close()