[zeromq-dev] ZMQ router-dealer set-up: can old socket identities be recycled? ("inproc")
Pieter Hintjens
ph at imatix.com
Tue Nov 13 06:32:03 CET 2012
On Tue, Nov 13, 2012 at 5:45 AM, Kah-Chan Low <kahchanlow at yahoo.com> wrote:
> Meanwhile I re-read the man page for ZMQ_IDENTITY and the following is now
> making more sense:
... what version of 0MQ are you using? In 3.x we removed this
'durable' aspect of identities because it was nasty in many ways and
really not the job of libzmq.
In 3.2, what identities do, and only for ROUTER sockets, is identify
the peer in some way other than "anonymous". It's up to the ROUTER
server what to do with this. Reusing identities is bound to create
problems unless it's your explicit intent.
I've been removing identity examples from the Guide because they're
misleading. In fact there are only three cases I see for them:
1. debugging, where you want to print something other than a random number
2. server-side persistence, where you want to manage some resources,
yourself, based on real peer identity
3. router-to-router connection, as in the Freelance pattern, where
this is the only way to inter-connect.
-Pieter
More information about the zeromq-dev
mailing list