[zeromq-dev] Trouble sending from ROUTER to DEALER

KIU Shueng Chuan nixchuan at gmail.com
Tue Sep 16 16:45:52 CEST 2014

In your multipartmsg.h file, you have code that does the following:
int32_t id = *(static_cast<int*>(zmq_msg_data(&messageIn)))

You have assumed that the auto generated identity is 4 bytes long, whereas
it is in fact 5 bytes long.
So when sending a reply, you would have sent a truncated identity, which
the router socket know nothing about.

More generally, you shouldn't need to write your code to "know" that auto
generated identities are of any specific size.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140916/3819b97f/attachment.htm>

More information about the zeromq-dev mailing list