[zeromq-dev] Router not reporting auto-generated identities?

Merijn Verstraaten merijn at inconsistent.nl
Sun Oct 28 21:38:36 CET 2012


While playing around with the code (latest version of the zeromq/libzmq repo) I noticed the issue: A recv on a router is supposed to add a message envelope containing the sender's identity, but this doesn't seem happen for auto generated identities.

Attached I have a simple test program that will run either a server (>2 arguments) or client (<=2 arguments), the client starts a ROUTER and simply prints all parts of a message on a single line. The server will use the second argument as IDENTITY and send any further arguments as messages to the client using a DEALER socket.

This produces the expected output:
$ ./test foo bar baz xyzzy quux
Server!

$ ./test
Client!
foo bar
foo baz
foo xyzzy
foo quux

So far, so good. Now, if we uncomment the zmq_setsockopt in the server we'd expect the router to produce auto-generated identities, but this doesn't happen.

$ ./test foo bar baz xyzzy quux
Server!

$ ./test
Client!
 bar
 baz
 xyzzy
 quux

Did I misunderstand anything or is this a bug?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: application/octet-stream
Size: 1309 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121028/693d8d80/attachment.obj>
-------------- next part --------------

--
Merijn


More information about the zeromq-dev mailing list