[zeromq-dev] Durable socket question

Neale Ferguson neale at sinenomine.net
Wed Nov 3 14:20:44 CET 2010


Thanks for the explanation. I am running 2.1.0. It is working as you described: I can start the PUSH side and let it queue messages which start getting received on the PULL side as soon as the connection is made. Like you said, if I CTRL-C the PULL side when there are messages queued then those messages are lost.

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?

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.

Neale


On 11/3/10 7:28 AM, "Pieter Hintjens" <ph at imatix.com> wrote:

On Wed, Nov 3, 2010 at 12:21 PM, Moritz Heidkamp
<moritz at twoticketsplease.de> wrote:

> are you sure that this is the case? I have exactly this setup here. The
> PUSH socket does not complain about not being able to send messages
> while no PULL socket is bound to the endpoint it is connected to but
> once a PULL socket is bound, it doesn't get any of the messages that
> were sent before. Am I missing someting perhaps? I did not set any
> options on either socket.

Without setting any options on the sockets, messages will normally get
load balanced from PUSH to PULL sockets, and indeed the sender will
queue outgoing messages until it can deliver them.  If you have a
minimal case where this does not happen, post it.  Note that if you're
using 0MQ/2.0.x you must wait in the sender until all messages are
sent.  If you kill either program before all messages have been sent,
they may be lost.

-Pieter
_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101103/528a7b84/attachment.htm>


More information about the zeromq-dev mailing list