[zeromq-dev] Identity and reconnection

Laurent Alebarde l.alebarde at free.fr
Wed Dec 18 10:20:19 CET 2013


"/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> 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 list
>> zeromq-dev at lists.zeromq.org
>> http://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/0abdf42b/attachment.htm>


More information about the zeromq-dev mailing list