[zeromq-dev] ZMTP query
Pieter Hintjens
ph at imatix.com
Wed Jul 2 12:46:25 CEST 2014
At a pinch, libzmq isn't respecting the RFC. However, the metadata is
extensible and adding a null identity property is allowed, even though
somewhat pointless. Your code has to parse the whole metadata and then
extract the properties you want to use.
-Pieter
On Wed, Jul 2, 2014 at 12:30 PM, Chris Laws <clawsicus at gmail.com> wrote:
> I am playing around with ZMTP for 'reasons'. I have implemented my own ZMTP
> client and I observe that when I connect to a ROUTER socket (which is a
> simple CZMQ server) and progress through the greeting and NULL handshake,
> the router is sending my client an identity property which I am not
> expecting.
>
> In the worked example section of 37/ZMTP there is text that states:
>
> The server validates the socket type, accepts it, and replies with a READY
> command that contains only the Socket-Type property (ROUTER sockets do not
> send an identity):
>
> +------+----+
> | %x04 | 28 |
> +------+----+
> +------+---+---+---+---+---+
> | %x05 | R | E | A | D | Y |
> +------+---+---+---+---+---+
> +----+---+---+---+---+---+---+---+---+---+---+---+
> | 11 | S | o | c | k | e | t | - | T | y | p | e |
> +----+---+---+---+---+---+---+---+---+---+---+---+
> +------+------+------+------+---+---+---+---+---+---+
> | %x00 | %x00 | %x00 | %x06 | R | O | U | T | E | R |
> +------+------+------+------+---+---+---+---+---+---+
>
> In my case, after the greeting I see a NULL security handshake command like
> this:
>
> b'\x04)\x05READY\x0bSocket-Type\x00\x00\x00\x06ROUTER\x08Identity\x00\x00\x00\x00'
>
> This isn't stopping me from doing anything. It's just a query stemming from
> what I'm seeing not aligning with my interpretation of the ZMTP
> specification page.
>
> From a quick look through the libzmq code (null_mechanism.cpp) it seems that
> the Identity property is explicitly added for REQ, DEALER and ROUTER
> sockets.
>
> Should the 37/ZMTP spec be updated?
>
> Regards,
> Chris
>
>
>
>
>
> _______________________________________________
> 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