[zeromq-dev] Is Pub/Sub unreliable
gonzalo diethelm
gdiethelm at dcv.cl
Tue Mar 9 23:26:34 CET 2010
I wrote two small apps: one binds a PUB socket to an endpoint and sends
N messages to it; the other connects a SUB socket to that same endpoint
and receives N messages. The sender optionally can wait a certain amount
of ms between each send, and it always waits for 60 seconds at the end.
I am attaching both files; all my tests are under Windows XP.
I run the following commands on two separate windows:
# send 20 msgs, waiting 50 ms between them, no poll
./sender tcp://127.0.0.1:5009 20 50 0
# receive 20 messages
./receiver tcp://127.0.0.1:5009 20
This works erratically. Sometimes receiver receives less than 20
messages; sometimes it receives NONE.
Is it the case that PUB/SUB sockets are unreliable? This is sort of a
surprise to me... If they are not, what could explain this behavior?
Thanks in advance.
--
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sender.cpp
Type: application/octet-stream
Size: 1356 bytes
Desc: sender.cpp
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100309/4337b764/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: receiver.cpp
Type: application/octet-stream
Size: 1011 bytes
Desc: receiver.cpp
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100309/4337b764/attachment-0001.obj>
More information about the zeromq-dev
mailing list