Assuming you're talking about route IDs with respect to ROUTER sockets,
it is possible to use predetermined IDs when sending messages.
For example, a client can create a ROUTER socket and connect it to
multiple servers. As long as it also knows the ZMQ_IDENTITY used by each
of these servers (you'd need to obtain this information out-of-band
somehow), the client can send a message to a specific server by
including the server's ZMQ_IDENTITY as the first message part.
On Sat, Feb 10, 2018, at 7:29 AM, Matthew Harrigan wrote:
> 
> I apologize in advance if this is a dumb question, but would still
> appreciate knowing why.  So, why can't a server socket initiate
> communication? I am focused on this documentation
> http://api.zeromq.org/4-2:zmq-socket. AFAICT the only state change
> that happens in a server socket when a client socket connects to it is
> that the map that relates addresses to routing id's get updated.
> Suppose a machine with a server socket knows what address it want to
> communicate with, whether hard coded, from a beacon, service locator,
> whatever.  Why can't it just tell the server socket to make a routing
> id to that address and then start communicating?  Note I am working on
> a toy educational project where a gaggle of peers uses raft to get a
> leader and formally join or leave (different from crashing or network
> partitions).  In such a peer to peer network the symmetry of each peer
> binding a server socket to itself and talking to other peers seems
> appealing.  Thank you> _________________________________________________
> zeromq-dev mailing list
> [email protected]
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to