I am using the router(server)--dealer(client) set-up in C++.  In my 
application, an existing dealer(client) connection may be disconnected from the 
router any time and the socket deallocated.  Similarly new dealers may be 
created and connect to the router at any time.  Each dealer is contained inside 
an object and I cast the object pointer into a string and set that as the 
dealer's identity.  During the course of execution new objects are continually 
created and old objects deleted.  As a result, it is possible to get a new 
object with the same object pointer value as one that has been recently 
deleted.  From time to time I would discover that messages sent by a dealer of 
a newly allocated object were getting lost; and this invariably happened when 
the new object has the same pointer value as an object that had been recently 
deallocated.  I then switched to a naming scheme that avoided recycling old 
socket identity names and the problem went
 away!  So it looks like the router has memory of identities of disconnected 
socket.  Is this intended.  My application is supposed to run for months and 
that means I have to use increasing long strings to ensure identity 
uniqueness.  Won't this have an impact on performance?
BTW, I am using "inproc" protocol.

Thanks!
KC
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to