Skip to content

Instantly share code, notes, and snippets.

@guillaumevincent
Created January 15, 2017 11:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillaumevincent/e7cddfdb39aa3c6d968af1d25ea35d9d to your computer and use it in GitHub Desktop.
Save guillaumevincent/e7cddfdb39aa3c6d968af1d25ea35d9d to your computer and use it in GitHub Desktop.
zmq lost message PUSH/PULL
$ python push.py
message n°0
message n°1
message n°2
message n°3
message n°4
message n°5
message n°6
message n°7
message n°8
message n°9
python pull.py
Received message n°0
Received message n°1
Received message n°4
Received message n°7
python pull.py
Received message n°2
Received message n°5
Received message n°8
Lost message 3,6 and 9
import zmq
context = zmq.Context()
socket = context.socket(zmq.PULL)
socket.connect("tcp://127.0.0.1:5557")
while True:
print("Received %s" % socket.recv_string())
import time
import zmq
context = zmq.Context()
socket = context.socket(zmq.PUSH)
socket.bind("tcp://127.0.0.1:5557")
for i in range(10):
message = "message n°%d" % i
print(message)
socket.send_string(message)
time.sleep(1)
@ADanayi
Copy link

ADanayi commented Dec 24, 2018

Hi. Isn't there any updates on this issue?

@Jackiexiao
Copy link

any udpate?

@guillaumevincent
Copy link
Author

no update, the issue is still present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment