[zeromq-dev] problem with zmq::poll in ZMQ_REQ-ZMQ_ROUTER example

Goswin von Brederlow goswin-v-b at web.de
Mon Apr 28 10:52:05 CEST 2014


On Sat, Apr 19, 2014 at 06:35:55PM +0530, Sandeep Joshi wrote:
> On Tue, Apr 15, 2014 at 2:42 PM, Goswin von Brederlow <goswin-v-b at web.de>wrote:
> 
> > On Mon, Apr 14, 2014 at 09:00:06PM +0530, Sandeep Joshi wrote:
> > > This error in zmq_poll was due to the same problem resolved today by
> > Goswin
> > >
> > > http://lists.zeromq.org/pipermail/zeromq-dev/2014-April/025880.html
> > >
> > > Every client must set the identity to be unique using
> > > zmq_setsockopt(ZMQ_IDENTITY) otherwise the ROUTER gets confused.   Once I
> > > did that, the programs worked.
> > >
> > > -Sandeep
> >
> > It's probably best not to set an identity at all because then you get
> > a unique one generated for you.
> >
> 
> Goswin,
> 
> Are you suggesting that calling zmq_setsockopt(identity) is not necessary ?
> I was not aware of that.
> Where is this documented ?
> 
> -Sandeep

Where is it documented that you must call it?

Most, if not all, examples in the guide don't set identities.

MfG
	Goswin



More information about the zeromq-dev mailing list