[zeromq-dev] Deadlock between REQ/REP sockets?

Martin Lucina mato at kotelna.sk
Fri May 28 01:05:37 CEST 2010

dleonar at gmail.com said:
> I am prohibited from posting code, so I'll do my best to describe my troubles.
> I've got a IPC client/server setup and I am having problems getting the server
> to respond consistantly. The server has a REP socket open that it uses to
> listen for client requests. When it receives a request, it creates a new P2P
> socket for that client, spawns a listen thread for that socket, and loops back
> around. The client creates a matching P2P socket and is able to send and
> receive messages on that socket.

Are you sending a reply down the REP socket after getting the initial

Don't forget that REQ/REP work in lockstep, and you must follow the correct
send/receive pattern:

REQ (client): srsrsrsr...
REP (service): rsrsrsrs...

Also, why the P2P socket?


More information about the zeromq-dev mailing list