[zeromq-dev] Durable socket question
Pieter Hintjens
ph at imatix.com
Wed Nov 3 14:46:37 CET 2010
On Wed, Nov 3, 2010 at 2:20 PM, Neale Ferguson <neale at sinenomine.net> wrote:
> What are the limitations if I change from PUSH/PULL to PUB/SUB – can I have
> multiple publishers and a single subscriber? Are messages that are published
> before the subscriber connects subject to loss?
This is explained in Ch1 of the Guide. Pubsub is a radio broadcast
model and subscribers will pretty much always lose the start of a
stream.
> Before I go trolling through the code is there a simple explanation of how
> the messages are queued before the PULL side gets up and running and why
> that same mechanism doesn’t take over when the PULL side disappears? I would
> be prepared to work on providing this capability if it isn’t architecturally
> not feasible.
Messages in transit (kernel, TCP buffers, etc.) will simply be lost if
the peer disconnects. One way of recovering is to use
acknowledgements and resends. Push/pull does not allow or provide
this. You may do that using xrep/xreq.
-Pieter
More information about the zeromq-dev
mailing list