I'm using the ZMQ pattern dealer/router.
In my project, a router is an agent manager and a dealer is an agent.
So I have many dealers and only one router.
Each dealer can send its own request to the router and wait for the reply.
The router listens to one port so it must be able to identify the routers.
I know that we can use zmq_setsockopt
for the dealer to give its an unique id. And if the dealer sends a request to the router, the router will receive its unique id and its request.
Imagine that the router has already had 10 requests coming from 10 dealers. Now the router wants to send a reply to the fifth dealer. How to do that?