[zeromq-dev] Confirmation of ZMQ_PUB + ZMQ_SWAP intended behavior

Pieter Hintjens ph at imatix.com
Fri Aug 19 21:27:39 CEST 2011

On Fri, Aug 19, 2011 at 9:19 PM, Christian Martinez <chmar at microsoft.com> wrote:

> Maybe I should ask this in a different way....Can you use swap to ensure that a subscriber who connects after a publisher has started will not miss messages.... If that's not the intended use what use is SWAP?

That's not the purpose of SWAP, it's really just a persistent buffer
(from one peer to one peer).

There are a few ways to allow late subscribers to catch up. There's a
complete and quite sophisticated design in the Guide, the Clone
pattern. This uses req/rep to send initial snapshots and pub-sub to
send key/value updates to a set of subscribers.


More information about the zeromq-dev mailing list