[zeromq-dev] Is inproc PUB SUB subject to the slow joiner problem?

Chris Billington chrisjbillington at gmail.com
Fri May 10 19:46:12 CEST 2019


The below pyzmq code sends a message on a PUB socket to a SUB socket via
inproc, without doing any kind of welcome messages or anything to get
around the slow joiner problem, and does not appear to drop messages.
However if I change the endpoint to a TCP one, then it is subject to the
slow joiner problem and the subscriber doesn't receive the initial message,
as expected.

import zmq

ctx = zmq.Context()
pub = ctx.socket(zmq.PUB)
sub = ctx.socket(zmq.SUB)

pub.bind('inproc://test')
sub.subscribe(b'')
sub.connect('inproc://test')
pub.send(b'hello')
print(sub.recv())


Is inproc guaranteed to not be subject to the slow joiner problem? Or am I
just getting lucky with not seeing messages dropped in my test? Since
inproc does not use separate IO threads, it stands to reason that slow
joining might not be an issue. If so, this would be great as it would allow
me to use simpler code for inproc PUB SUB.

Regards,

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20190510/4607236c/attachment.htm>


More information about the zeromq-dev mailing list