Hi Not sure why Justin suggested using a ROUTER-Socket on each side.
I think having the A node bind a ROUTER socket and each B node connect using a DEALER socket is enough. One single TCP port would have to be bound. The ROUTER socket on the A node is needed to distinguish between the different B nodes when receiving/sending messages. The B nodes don’t need to make that distinction because it’ll always be the A node implicitly. Regards, Patrik > On 14 Feb 2018, at 15:14, Justin Azoff <[email protected]> wrote: > > You would most likely use a ZMQ_ROUTER socket on both ends: > > Summary of ZMQ_ROUTER characteristics: > Compatible peer sockets ZMQ_DEALER, ZMQ_REQ, ZMQ_ROUTER > Direction Bidirectional > > >> On Wed, Feb 14, 2018 at 9:08 AM, Jake <[email protected]> wrote: >> What do would be an appropriate pattern to achieve bidirectional, >> asynchronous messages between two nodes over TCP transport without binding >> more than one TCP port? The two nodes would be in different processes at >> least and possibly on different machines. I can imagine that a pair of >> PUSH->PULL sockets would enable this, where Node A and Node B each bind a >> TCP port with a PULL socket and connect to each other with a PUSH socket. >> However, I will have a one-to-many relationship between an A node and >> several B nodes, so needing a distinct port on A for each B limits the >> design. Ideally, only B nodes would bind a port for their A node to connect >> to. >> >> -Jake Cobb >> >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> https://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > > > -- > - Justin > _______________________________________________ > 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
