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

Dhammika Pathirana dhammika at gmail.com
Fri Dec 17 18:16:10 CET 2010


Martin,

On Fri, Dec 17, 2010 at 3:31 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Hi,
>
>> 1) Using one zmq context, I bind four separate zmq sockets (in java) to
>> the same ipc port; e.g. "ipc://tmp/test"
>
> Hm, you should be able to bind at most one socket to a particular
> endpoint. Are you sure all the four binds succeed?
>


All four binds will succeed, as we unlink() before we call bind().
This is a bug and comments here are misleading.

217     else if (strcmp (protocol_, "ipc") == 0) {
218
219         //  Get rid of the file associated with the UNIX domain socket that
220         //  may have been left behind by the previous run of the
application.
221         ::unlink (addr_);
222


Dhammika



More information about the zeromq-dev mailing list