I'm trying to design a system using ZeroMQ where I have a bunch of consumers that each want to use a service, and I need a way for the consumers to start the desired service if it's not started yet. I can visualize having a broker do this (useful to do so, since both consumers and service are dynamic, and their endpoints are TCP ports that can't be known before runtime), but then I have to figure out how to start the broker if it hasn't started yet.
How do you reliably start a single broker using ZeroMQ? The call to bind()
seems to accept more than one socket.