[zeromq-dev] Q; running multiple REP listeners on an IPC socket, only the last one connected gets any messages

Dr Tune drtune at gmail.com
Fri Dec 17 02:30:53 CET 2010


Hi all,
Feeling my way around this most excellent (and lean!) middleware.

I'm using both Java and c zmq libraries in different parts of my system.
I may be misunderstanding or have a code bug but my assumption is that;

1) Using one zmq context, I bind four separate zmq sockets (in java) to the
same ipc port; e.g. "ipc://tmp/test"

2) I have multiple client processes (on same machine of course) which
connect dozens of REQ sockets to that same IPC address.

Expected result:  The four REP listener sockets would be roughly
load-balanced with the requests; i.e. I could start 4 threads, each with a
REP listening to the same IPC port, and they'd be approximately load
balanced with messages.

Actual result: I am finding that only the last REP socket connected actually
gets any messages; the others get nothing.

Is it a bug in my code or am I misunderstanding things?

If IPC REP sockets cannot have multiple (balanced) BIND-ers, must I build a
REP server with only one message listener thread? This doesn't match my
understanding of zmq design goals, so I suspect it's my bug.

Many thanks,
DrTune.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101216/ccfcb2f4/attachment.htm>


More information about the zeromq-dev mailing list