[zeromq-dev] max PUB/SUB topics
Brian T. Carcich
briantcarcich at gmail.com
Fri May 17 17:00:17 CEST 2019
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 <luca.boccassi at gmail.com>
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 <wallstprog at gmail.com>
> > 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
> > zeromq-dev at lists.zeromq.org
> >
> > https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> >
> --
> Kind regards,
> Luca Boccassi
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20190517/4c4ecd1e/attachment.htm>
More information about the zeromq-dev
mailing list