[zeromq-dev] PUB doesn't discard msg when no SUB

Pieter Hintjens ph at imatix.com
Thu May 26 22:15:57 CEST 2011


On Thu, May 26, 2011 at 1:08 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:

> The problem with that is that Internet, as is widely known, is a series
> of tubes, meaning that there's a lot of tubes between the sender and the
> receiver, the 0MQ tx queue being just first of them. Thus if we start
> dropping oldest messages from the tx queue, we won't be actually
> dropping oldest queued messages but rather middle-aged messages. (The
> other tubes are TCP buffers, any intermediary devices, 0MQ queue on the
> receiver etc.)

Well, if you apply the HWM on the receiver side this certainly isn't a
problem, and you can drop the oldest messages to make space for the
newest ones.

On the publisher side, dropping middle-aged messages may seem
inconsistent but IMO for a pubsub model that is still much better than
dropping newest messages. It's a given that the message flow is
asynchronous and by definition we can't drop stuff that's already been
sent to lower layers. That's no justification for dropping the newest
messages, though.

-Pieter



More information about the zeromq-dev mailing list