[zeromq-dev] PUSH/PULL lost messages (once again)

Pieter Hintjens ph at imatix.com
Fri Mar 8 11:58:43 CET 2013


On Fri, Mar 8, 2013 at 11:42 AM, Jean-François Smigielski
<jf.smigielski at gmail.com> wrote:

> To check error cases, in the same test program (here below) I voluntarily
> connected a PUSH'er to 2 tcp URL, one valid and one that never existed (and
> won't ever).

When you connect, you create a queue for outgoing messages, which will
be delivered when the connection succeeds.

In your design this is guaranteed to lose 50% of messages.

If you bind the PUSH and connect the PULL to it, you won't lose
messages. This is the normal design when you have N workers, where
some may disappear randomly.

-Pieter



More information about the zeromq-dev mailing list