[zeromq-dev] PUB connect first, SUB bind after, doesn't work?

gonzalo diethelm gdiethelm at dcv.cl
Fri Oct 1 19:41:17 CEST 2010

> > Prog1: create PUB socket, connect it to tcp://, set
> > watermark to 1, and start sending messages every 5 seconds.
> >
> > Prog2: create SUB socket, bind it to tcp://, and
> > to all messages.
> >
> > If Prog2 starts before Prog1, everything works as intended and Prog2
> > receives messages (sent from Prog1) every five seconds.
> >
> > If Prog1 starts before Prog2, the messages are sent from Prog1 but
> > nothing is received in Prog2.
> Are you saying you don't even get messages that were sent *after*
> was started?

Yes. Prog1 acts as a beacon and sends messages every 2 seconds, forever.
In the second case, Prog2 doesn't get any of them.

> If so, it looks like a serious bug. Can you post the test programs?

Not yet; I am seeing this in a much larger project, so I need to distill
it down into a simpler program. Of course, I am sure when I do that I
will see the origin of the problem, or it will just go away...

Gonzalo Diethelm

More information about the zeromq-dev mailing list