[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
Sat Dec 18 18:19:21 CET 2010

On Sat, Dec 18, 2010 at 12:30 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> Dhammika,
>>>> 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.
> True.
> What about not unlinking the file at bind? Would the duplicit bind()s
> produce errors?

Yes, duplicate binds will return EADDRINUSE.

And would the OS recognise when an applicaion fails and
> unlock the file so that different application can bind to the endpoint?

No, OS doesn't delete it on app exit.
app has to remove it, ie. call zmq socket close().


More information about the zeromq-dev mailing list