[zeromq-dev] XPUB subscription notifications

Dan Goes DGoes at blueorigin.com
Fri Oct 5 18:05:44 CEST 2012


Thanks for all the ideas, I'll look into implementing one of these. Given our design, and that connection awareness on the publisher side is primarily a diagnostic feature, something like Pieter's setsockopt solution would be ideal due to its simplicity (if less robust to the things that Ian mentioned). But, our requirements may change and necessitate an explicit protocol. 

Dan

-----Original Message-----
From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Ian Barber
Sent: Friday, October 05, 2012 3:27 AM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] XPUB subscription notifications

On Thu, Oct 4, 2012 at 7:25 PM, Pieter Hintjens <ph at imatix.com> wrote:
>
> I can see two options. One is to extend XPUB so it does this, enabling 
> that with a setsockopt. Second is to switch to ROUTER sockets with an 
> explicit protocol for subscription and last used values.
>
> -Pieter

+1 - the idea with the PUB/SUB implementation is that you are dealing
with a group, whos membership may change without affecting the publisher (particularly for trees of pubs). You could use a subscribe message in a specific format (like sub-IP-port) or similar to ensure you're triggered an XPUB message upstream, but unless you have return channel heartbeating as well, you're not going to be aware of timeouts, disconnects, reconnects and so on, particularly > 1-hop down. If that stuff is what you need, build the protocol over ROUTER.
It's worth thinking through the error cases though and seeing whether you could use, say, PUB/SUB with a sequence number and a separate repairer to handle dropouts, which makes life easier in some cases.

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



More information about the zeromq-dev mailing list