Good point. I think the main takeaway of this thread is that ZMQ_SUBSCRIBE calls are not local to the subscriber that initiates them: they invoke sending of messages to the publisher., which messages are in turn subject to the subscriber's ZMQ_SNDHWM option setting.
I fixed a few bugs, and fleshed out the README.md, in my PUB/SUB example code <https://github.com/drbitboy/test_0mq_subscribe_limit>; I also added command-line options to not set 0=>SNDHWM for the subscriber and to not set 0=>RCVHWM for the publisher. One odd behavior I noticed is this: - If the send HWM is not set to 0 (infinite) for the subscriber, then only the first 1000 subscriptions succeed - That is not the odd behavior - The odd behavior is this: all 65,536 subscriptions will become active - If the publisher is subsequently interrupted (Control-C) and restarted, - While leaving that same subscriber running. On Fri, May 17, 2019 at 6:00 AM Luca Boccassi <[email protected]> wrote: > Note: only if the publisher is too slow and can't process them in time, > like with all other interactions between PUB/SUB. > > On Thu, 2019-05-16 at 23:48 -0400, Brian T. Carcich wrote: > > There is no error message. > > > > AFAICT, the default 1000-message ZMQ_SNDHWM prevents the subscriber's > > one-thousand-first and subsequent subscribe calls to quietly fail. > > > > > > On Thu, May 16, 2019 at 9:38 AM Bill Torpey <[email protected]> > > wrote: > > > I would be curious what errno was returned with the failing > > > subscribe call. If EAGAIN, that would at least provide a clue to > > > what was happening. If not, then this should perhaps be raised as > > > an issue so it will get fixed. > > > > > > > > > > I updated my example code, and it now works as expected. > > > > > > > > _______________________________________________ > > zeromq-dev mailing list > > [email protected] > > > > https://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > -- > Kind regards, > Luca Boccassi > _______________________________________________ > zeromq-dev mailing list > [email protected] > https://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
