Hi Paul, Yes, the peer could supply its identity in the message. I was just concerned about multiple peers claiming the same name. Perhaps it could be an error to do so. I would prefer to allowing it, but have a mechanism in place to route replies back to the originating peer regardless of what it called itself. I suspect there's a certain gestalt for nanomsg that's bit different than the 0mq "way", that I'm still working to understand. Regards, Lyle > -----Original Message----- > From: nanomsg-bounce@xxxxxxxxxxxxx [mailto:nanomsg- > bounce@xxxxxxxxxxxxx] On Behalf Of Paul Colomiets > Sent: Tuesday, January 13, 2015 1:58 PM > To: nanomsg@xxxxxxxxxxxxx > Subject: [nanomsg] Re: implementing ROUTER in 0mq > > Hi Lyle, > > > > On Tue, Jan 13, 2015 at 8:51 PM, Lyle Thompson <lthompson@xxxxxxxxxxx> > wrote: > > I am looking to reimplement a message broker that I wrote in 0mq with > > nanomsg. I was using ROUTER extensively in that implementation, which > > of course nanomsg doesn’t have. So I’m just looking for some > > implementation advice. So it all starts with the receiving socket, > > which needs to accept connections from multiple sources, associate the > > connection “name” with that socket and prepend it to the message as > > the first “frame”, and then pass the message on up. Later, when > > sending a message, I will pop the first “frame”, look up the associated > socket, and send it down. > > What is the purpose of the "name"? You may just add a "name" to every > message and forget of thinking in terms of connections, but rather think > about messages from named peers. Sure it's not viable if that is a security > feature. In the latter case you may better use encryption. > > Just a thought, not sure if it's the best advice :) > > > -- > Paul