imatix/zguide — Issue #123: zmq_queue and socket types
Author: maesker
Created: 2011-11-14 23:09:46+00:00
State: open

Section:
"Multithreading with zeromq"

Code example:
mtserver: Multithreaded service in C

In this example the frontend socket is of type "ZMQ_ROUTER" and the backend of type "ZMQ_DEALER". The documentation of the zmq_queue recommends to use "ZMQ_XREP" for the frontend and "ZMQ_XREQ" for the backend.

The zmq_queue claims to return response messages to the same client that sent the request. Im my project the use of the ROUTER/DEALER sockets lead to strange routing effects using multithreaded clients.

Btw: if i recall correctly ZMQ_XREP / ZMQ_XREQ are deprecated and replaced by ZMQ_REP and ZMQ_REQ respectively.