I'm using ZMQ 3 on Linux and I cannot understand behaviour of my code. I have two applications connected with ZMQ's IPC. Client makes REQ socket and connect to it and server makes ROUTER socket and bind to it. Then Client send message to the REQ socket. According to ZMQ guide ROUTER should receive 3 messages (identity, empty, content), but actually it gets 4 messages (2 frames of identity, empty and content). I've read ZMQ guide and ROUTER socket code and I still don't get why there is this strange multipart identity message. This is part of my code: pastebin.com/MWySYm2C
1 Answers
1
votes
You don't say precisely what version of zmq you are using on both the client and server. There are known incompatibilities between early v3 versions, but IIRC v3.2 had a lot of work put in to make the wire protocol stable (and similar incompatibilities shouldn't happen with other versions). Yes, the documentation is correct and you should see 3 frames from a REQ.
FWIW. I'd recomend switching to use the CZMQ binding because the API is sooo much easier to use than raw zmq.