[zeromq-dev] Identity and reconnection

Bruno D. Rodrigues bruno.rodrigues at litux.org
Wed Dec 18 10:30:19 CET 2013


That is great information. The wire protocol is quite elegant.

But from a users perspective the router will always see the same identity,
or better, the app sending messages via router to the other n apps will
always reach each of them by consistent identities.

At least this is what I'm counting on with my code. ;)



--
Bruno Rodrigues
Sent from my iPhone

No dia 18/12/2013, às 09:20, Laurent Alebarde <l.alebarde at free.fr> escreveu:

 "*From my experience if you set the dealer identity before connecting, by
design it will always use that value. *" : Except during the handcheck
duration where the identity is a self determined one of 5 bytes. If you set
the identity option, it will be changed by the server at the end of the
handcheck, from the information it collects from the metadata. In most use
cases, this is not seen by the application and you should not be aware of
it, except if you connect a ZMQ_STREAM to a ZMTP socket.

Whatever connexion you make, the server will use a random 5 bytes identity
for the first connexion to a given socket, and will increment it for the
next one.


Le 17/12/2013 23:44, Bruno D. Rodrigues a écrit :

>From my experience if you set the dealer identity before connecting,
by design it will always use that value. It's when the identity is not
set manually and the router calculates a unique id that it will
change.



--
Bruno Rodrigues
Sent from my iPhone

No dia 17/12/2013, às 22:33, Greg Ward <greg at gerg.ca> <greg at gerg.ca> escreveu:


 On 17 December 2013, Lindley French said:

 This is a bit of a novice question, but I can't find any answer to this in
the Guide....

If a DEALER is connected to a ROUTER, and the underlying TCP connection
goes down for some reason and is then reestablished, will the DEALER still
have the same identity in the ROUTER?

 No.

Disclaimer: I'm not a 0MQ expert, and I haven't read the source code
or the documentation for this. But late last week, I incorrectly
assumed that the same 0MQ ID works for the entire lifetime of a
server, even if clients disconnect and reconnect. That incorrect
assumption cost me 2 days of debugging. Learn from my fail. ;-)

      Greg
_______________________________________________
zeromq-dev mailing
listzeromq-dev at lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev

 _______________________________________________
zeromq-dev mailing
listzeromq-dev at lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev


_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131218/489283ff/attachment.htm>


More information about the zeromq-dev mailing list