[zeromq-dev] Is Pub/Sub unreliable

gonzalo diethelm gdiethelm at dcv.cl
Wed Mar 10 14:44:03 CET 2010

> > 2. If the sender sleeps, say, 50 ms, the receiver misses a few of
> > initial messages sent by sender.
> That's because delay between two subsequent attempts to reconnect is
> to 100ms. See src/config.hpp:
>          //  Maximal wait time for a timer (milliseconds).
>          max_timer_period = 100,
> The problem is that you are dealing with completely asynchronous
> (the network). You cannot expect anything will happen "immediately".
> Getting SUB socket notified about PUB socket being alive takes some
> time. In this case it's 100ms. You can lower the time needed by
> the value I've mentioned above, however, it'll never be instant.

Ok, that makes perfect sense now. And the reason this is not apparent
for Upstream / Downstream sockets is because they queue any unsent
messages, so all messages are eventually sent after a successful
reconnection, right?

So I guess it is not a bad idea to always add a small sleep time (say,
200 ms) after binding to a PUB socket. What do you think?

Gonzalo Diethelm

Declaración de confidencialidad: Este Mensaje esta destinado para
el uso de la o las personas o entidades a quien ha sido dirigido y
puede contener información reservada y confidencial que no puede
ser divulgada, difundida, ni aprovechada en forma alguna. El uso no
autorizado de la información contenida en este correo podrá ser
sancionado de conformidad con la ley chilena. 
Si usted ha recibido este correo electrónico por error, le pedimos
eliminarlo junto con los archivos adjuntos y avisar inmediatamente
al remitente, respondiendo este mensaje. 

"Before printing this e-mail think if is really necesary".
Disclosure: This Message is to be used by the individual,
individuals or entities that it is addressed to and may include
private and confidential information that may not be disclosed,
made public nor used in any way at all. Unauthorized use of the
information in this electronic mail message may be subject to the
penalties set forth by Chilean law. 
If you have received this electronic mail message in error, we ask
you to destroy the message and its attached file(s) and to
immediately notify the sender by answering this message. 

More information about the zeromq-dev mailing list