[zeromq-dev] Timeout issue with concurrent send and recv

Goswin von Brederlow goswin-v-b at web.de
Thu Jun 26 10:38:38 CEST 2014

On Wed, Jun 25, 2014 at 12:56:14PM -0400, brian at openbazaar.org wrote:
> If I have two servers talking to each other and each listens and send
> via the same port and they send messages at the same time to each
> other will this create a race condition? I'm seeing a timeout in this
> situation with my servers. Should zeromq servers that act as client
> and server listen and send via different ports? Can that even happen?

One side must bind and one side must connect. If both are on the same
system they can't have the same port. The connecting side will get a
random port anyway and the kernel will not give you one that is
already bound or won't let you bind to a port already used otherwise.

As for listening, I assume you mean receving, and sending on the same
port, I assume you mean socket, that is how it usualy works. But not
all ZMQ socket types are bidirectional. Check the docs and look into


More information about the zeromq-dev mailing list