[zeromq-dev] Router-Dealer Example not working in C on 4.0.4 ZMQ release

Badhrinath Manoharan badhrim at gmail.com
Fri Jul 25 22:17:19 CEST 2014

Hi Peter,

No issues at all. I totally get your thoughts here. Thanks a lot again for the detailed response. 

I just got misled that we could use Router - Dealer as similar to Rep - Req socket. Moreover I had one client and one server so thought it might work.

Anyways thanks a lot for correcting my understanding. Will surely give it a try and update the thread.

Thanks again

Sent from my iPhone

On Jul 25, 2014, at 1:33 AM, Pieter Hintjens <ph at imatix.com> wrote:

> Sorry if that email seemed unpolite; it was late and I'd been driving
> for 10 hours with three small kids who refused to sleep.
> So, ROUTER sockets always prefix the incoming message with an extra
> frame that holds a routing id (aka "identity"), that identifies which
> pipe the message came in from. You stick that same frame back before
> outgoing replies, and the ROUTER socket then knows which pipe to send
> it to.
> These IDs start with a binary zero. If you try to printf them, the
> result is an empty string. In my example code, if you tried it, the
> print shows this ID frame quite clearly.
> This is explained in detail in Chapter 3 of the Guide, and briefly in
> the zmq_socket man page for ZMQ_ROUTER.
> It is not trivial, and you should really read the Guide and work
> through the examples before trying to use ROUTER.
> -Pieter
> On Fri, Jul 25, 2014 at 12:53 AM, Pieter Hintjens <ph at imatix.com> wrote:
>> You're not reading the man pages, nor documentation, nor example
>> output properly.
> _______________________________________________
> 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