Hi, Pieter Thanks for your reply!
Let me explain what I did: 1. In file "durapub2.c" line 32, I commented out the "update_nbr < 10" in "for (update_nbr = 0; /*update_nbr < 10*/; update_nbr++)" to make it loop infinitely; 2. In file "durapub2.c" line 36, I changed "sleep (1);" to "usleep(500000);" for faster message publishing; 3. File "durasub.c" was not changed; Then I started durapub2 and durasub, things goes fine. But when I press CTRL-C on durasub, wait a while and restart it again, all messages it missed were received(no matter what number the hwm in durapub2.c was set to). And if I did not restart durasub, the durapub2 will keep allocating more memory infinitely until the system was broken. Based on the above, I guess the high water mark had no effect at all! On Tue, Jul 26, 2011 at 4:51 PM, Pieter Hintjens <[email protected]> wrote: > PUB sockets will cache a small number (10 or so) of outgoing messages, > this is probably what you're seeing. > > -Pieter > > On Tue, Jul 26, 2011 at 1:15 AM, Tonis Xie <[email protected]> wrote: > > Hello, when I build and run durapub2.c example on ZeroMQ2-1 library, > which > > is supposed to have high water mark effect, it continues to give the > whole > > updates after I press CTRL-C and rerun durasub in about 4 seconds, just > like > > the socket have not touch the high water mark(that is set to 1) at all! > > Did anyone meet this problem before? Or is it a bug in ZeroMQ? > > > > _______________________________________________ > > zeromq-dev mailing list > > [email protected] > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
