[zeromq-dev] router->rep

Martin Sustrik sustrik at 250bpm.com
Tue Nov 22 08:55:20 CET 2011

On 11/22/2011 06:16 AM, yanbinbin wrote:
> hi all:
> In the chapter three of the guide, it say:REP stores all the message
> parts up to the first empty message part........REP requires that the
> envelopes end with an empty message part. If you're not using REQ at the
> other end of the chain then you must add the empty message part yourself.
> So how can i construct a msg from router to rep? i do like this:there
> are many rep and use setsockopt set the identity, in
> router:s_sendmore(soket, "A");//it's one of rep's identity;then i should
> send empty first or the real data first? s_sendmore(socket, "")?
> s_send(socket, real_data)?
> the identity "A" rep just don't recv any msg despite change the empty
> part and the real data's order;

Send just the empty part followed by the message body itself. This 
applies to 0MQ/2.1.x


More information about the zeromq-dev mailing list