You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've setup a subscriber socket with a given topic. However, it seems that sub.Recv() is non blocking and constantly returns empty messages even when the publisher isn't sending any messages. Is this behavior wanted and if so, how can I make sub.Recv() block until actually a message is available?
Here is a code snippet showing my intend: len(msg.Frames) == 0 is constantly hit
What version are you using? I'm unable to reproduce this with using the snippet you've provided on the latest version of zmq4.
In any case, you shouldn't be creating a sub socket with a timeout context if you want to block on read. When the context is done it will unblock all IO including sub.Recv.
I've setup a subscriber socket with a given topic. However, it seems that
sub.Recv()
is non blocking and constantly returns empty messages even when the publisher isn't sending any messages. Is this behavior wanted and if so, how can I makesub.Recv()
block until actually a message is available?Here is a code snippet showing my intend:
len(msg.Frames) == 0
is constantly hitThe text was updated successfully, but these errors were encountered: