[zeromq-dev] ROUTER-DEALER zmq_proxy Question.

Riskybiz riskybizlive at live.com
Wed Mar 4 22:08:15 CET 2015

Reading the zeromq api <http://api.zeromq.org/4-0:zmq-proxy>  docs I see
that a zmq_proxy can be used as a shared queue.


'Shared queue

When the frontend is a ZMQ_ROUTER socket, and the backend is a ZMQ_DEALER
socket, the proxy shall act as a shared queue that collects requests from a
set of clients, and distributes these fairly among a set of services.
Requests shall be fair-queued from frontend connections and distributed
evenly across backend connections. Replies shall automatically return to the
client that made the original request.'



I have a few (simple) questions on zmq_proxy which I hoped someone might be
able to answer;


1.    What is the maximum size of a zmq_proxy queue, what is its capacity
for storing queued messages; is it related to the high-water-mark settings
of the constituent sockets?  Or is it able to grow to any size limited only
by available memory.  Or something else entirely?


2.    How fast does a zmq_proxy run and process messages; does it run as
fast as possible in its thread? Does it poll at intervals and then sleep for
a period? Does it somehow respond to load and throttle up and down as


3.    Just to clarify before I start coding J: Is a ROUTER-DEALER zmq_proxy
a bidirectional queue?  What I'm considering is this;


A ROUTER-DEALER zmq_proxy with a set of clients communicating with the
zmq_proxy ROUTER socket and an answering service using the zmq_proxy DEALER


Could the answering service pull an inbound queued message off the zmq_proxy
DEALER socket; process it, catch the identity of the originator client,
create a response, prepend the identity and then send the response back
through the same zmq_proxy DEALER socket and have it routed back to the
correct originating client?  i.e. Both inbound and outbound queues would
conceptually be built into a single ROUTER-DEALER zmq_proxy?


With thanks,




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150304/161eda1a/attachment.htm>

More information about the zeromq-dev mailing list