I have been looking into zmq for a while now and have implemented a simplified poc - to mimic my infrastructure design - using it (specifically using the NetMQ wrapper), with great results.
My situation is this:
In the future I am planning to run multiple clients on a single machine, where each client needs to communicate with a "server" (located on a different machine) via multiple sockets.
I've noticed that for each socket that I declare and open explicity many more are opened internally by zmq and are managed by it.
Edit
binding sockets get a new port allocated in the dynamic range and that is fine,
but although my client connects explicitly to only 2 ports, some 15 ports are allocated for him automatically by zmq.
this, I fear, might eventually lead to a shortage of ports, a situation I very much want to avoid.
The questions:
How does zmq allocates ports intenally and what is the ratio between explicitly declared sockets and the ports zmq openes automatically?
Is there a way for me to control the port allocation programatically, via configuration or by any other means?
How does using a poll affects the ports usage?
Tnx,