[zeromq-dev] [PATCH] Introduce ZMQ_ROUTER and ZMQ_DEALER sockets

Martin Sustrik sustrik at 250bpm.com
Mon Jun 20 14:20:18 CEST 2011

Hi Pieter, Ian,

>     A typical addressvalue would consist of host IP address, ":", and
>     port number.

 From 0MQ's point of view, identities are just BLOBs so they can contain 
anything be it a blob or an IP address or whatever. The only constraint 
is that the BLOB should uniquely identity particular connection *instance*.

> This seems to open the possibility of getting unintended duplicate
> identity issues. For example, if I have a script that creates a socket,
> connects, and exits, I could easily share an identity over a short time
> period.

Yes. To make it work well, an unique ID, such as UUID or timestamp would 
have to be added to the address.

> There could also be an issue with NAT perhaps.

Using source port instead of destination port should help with that.

>I guess IPC would be PID

Same problem as above. PIDs can be re-used.

> and inproc could just use some incrementing value or similar

That would work.

> For PGM I guess it would have to be the interface IP address, though we
> don't have an easily distinguishable port there do we? AFAIU you could
> have multiple publishers on one box pushing from the same interface onto
> the same multicast IP/port?

PGM doesn't work with ROUTER socket so there's no problem here.

> I think there would need to still be the leading null or similar to
> distinguish generated identifies from manual identities


> or are manual identities being ditched completely in 3 (I am fine with that :)).

That would be nice, but users want the feature to remain, so it's going 
to remain.


More information about the zeromq-dev mailing list