[zeromq-dev] ROUTER & identity value.

Arnaud Kapp kapp.arno at gmail.com
Sat Nov 8 22:21:56 CET 2014


Hello,

The identity is binary content. It may very well be non printable bytes,
which would explain why it has no problem mapping from router to dealer but
cannot be displayed.
On Linux, try running your program piped to "cat -e": ./a.out | cat -e  ;;
IIRC it will some non-printable char.

On an other note, if you're going to use ZMQ in a c++ codebase, let me
recommend https://github.com/zeromq/zmqpp !

On Sat, Nov 8, 2014 at 10:13 PM, Riskybiz <riskybizlive at live.com> wrote:

> I’ve created this zeromq-4.0.4 MultiPartMessage.h
> <http://pastebin.com/hhKDamzt> class in C++.  It functions nicely.
> However I cannot fathom one aspect of its behaviour……..
>
>
>
> When the receive constructor is called to receive a message off a ROUTER
> socket then the inbound message identity should be stored in the class
> member variable ‘id’ (circa line 161).  However whenever I use the
> getIdentity() method on either Windows 7 or Debian Wheezy to get the value
> then print the identity to the console window then there is nothing to see,
> just a blank.
>
>
>
> What baffles me is that when replying to the message I use the
> getIdentity() method of the received message to set the destination
> identity in the send constructor of a different class instance AND the
> message gets back through to the originator.
>
>
>
> So it’s possible to pass messages from DEALER to ROUTER put the
> MultiPartMessage in a queue and later send it back to the originating
> DEALER; but I cannot visualise the identity value in the console!
>
>
>
> Does anyone know why this should be?
>
>
>
> Perplexed.
>
>
>
> Riskybiz.
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>


-- 
Kapp Arnaud - Xaqq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141108/06c6c4ff/attachment.htm>


More information about the zeromq-dev mailing list