I'm trying to set up "inverted" PUB/SUB with ZeroMQ.
Meaning that subscribing (SUB) sockets belong to several long-living servers, doing zmq_bind()
; and publishing (PUB) socket is a short-lived client and does zmq_connect()
.
I use a single ipc://
socket.
I expect that a message from the publisher will reach each of subscribers.
The problem: Only one of subscriber processes ever receives messages. If that process dies, publisher gets stuck in zmq_term()
.
Is this mode of operations supported by zmq? If yes, then what am I doing wrong? If no, then how to implement what I need?
Minimal example with some additional details (in Lua, but this should not matter): https://gist.github.com/938429