[zeromq-dev] ROUTER sockets and IDENTITY
Mark Barbisan
Mark.Barbisan at evault.com
Tue Jul 2 15:44:43 CEST 2013
Hi Pieter,
Thank you for the quick response.
The behaviour I was thinking about would be very simple: when the router socket encounters a connection with an already taken identity, it allows the new connection to assume that identity.
>From my very limited knowledge of the code, it seems that the router socket maintains a map of the identity to a pair of pipes that can have queued messages. So hopefully this 'identity switch' would maintain these queues. That is, any queued messages would have to be transferred to the queues for the new connection, rather than just dropping them.
This new behaviour could be enabled via a new flag for zmq_setsockopt. However, it would have to assume a trusted/secured network.
What do you think?
- Mark.
-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Pieter Hintjens
Sent: June-27-13 2:05 PM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] ROUTER sockets and IDENTITY
You're right, the reconnection will be refused the right to reuse the identity. We could change this if you can find a sensible semantic.
-Pieter
On Thu, Jun 27, 2013 at 4:20 PM, Mark Barbisan <Mark.Barbisan at evault.com> wrote:
> Hello,
>
> ZeroMQ supports multiple NICs for its sockets. If a client gets disconnected with queued messages, it will automatically try to reconnect with the other available NICs. However, there is a problem if the client has set its socket identity (using ZMQ_IDENTITY). The identity does not change upon reconnect. A server with a ROUTER socket that receives the new client's connection will see the same ZMQ_IDENTITY again. However, since the new incoming connection uses a different address (due to a different NIC) but has the same identity, the ROUTER socket will automatically place it into a list of "anonymous" connections. The client has no way of receiving responses.
>
> Does ZeroMQ provide a facility to reassign identities for the clients of ROUTER sockets?
>
> Thanks,
>
> - Mark.
> _______________________________________________
> 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
More information about the zeromq-dev
mailing list