[zeromq-dev] PUB/SUB message order

Pieter Hintjens ph at imatix.com
Thu Jun 20 20:33:52 CEST 2013


On Thu, Jun 20, 2013 at 7:57 PM, Felipe Farinon
<felipe.farinon at powersyslab.com> wrote:

> One more question: there is no need to worry about messages being lost while
> traveling in the network? The only scenario where a message will be
> discarded is when the publisher enters in the mute state?

Here is the text from RFC 23[1] (which libzmq implements):

An XPUB socket MAY be connected to any number of XSUB peers. It SHALL
send every outgoing message to all connected peers, filtered by peer
subscriptions.

An XPUB socket SHALL not modify outgoing messages in any way.

An XPUB socket SHALL create a queue and accept outgoing messages
immediately when initiating a connection to a peer, and SHALL maintain
this queue whether or not the connection is established.

An XPUB socket SHALL create a queue and accept outgoing messages when
a peer connects to it. If this peer disconnects, the XPUB socket SHALL
destroy its queue and SHALL destroy all undeliverable messages it
contains.

When its queue is full, a peer becomes unavailable, and the XPUB
socket SHALL drop further messages to that peer. An XPUB socket SHALL
NOT block on sending.

-Pieter

[1] http://rfc.zeromq.org/spec:23



More information about the zeromq-dev mailing list