[zeromq-dev] subscribe/unsubscribe refcounting behaviour

Martin Sustrik sustrik at 250bpm.com
Thu Aug 19 11:25:09 CEST 2010


Pieter Hintjens wrote:
> On Thu, Aug 19, 2010 at 9:54 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> 
>> Yes. It can be done. I can even imagine both ways of doing things:
>> idempotent subscriptions as well as refcounted subscriptions. My feeling
>> is that as we progress with the subscription forwarding implementation
>> one option would prove as unsuitable. So let's preserve current
>> semantics and see whether it holds as implementation progresses or
>> whether it will have to be changed.
> 
> That's a very good approach.  Intuitively it seems that since a
> network of forwarders each act as publishers and subscribers in turn,
> each will have to normalize subscriptions upstream, denormalize
> messages downstream, and so this will all "just work" idempotently.
> But running code is the only proof... :-)

Yep. I think there will be at least several issues that will come into play:

1. How subscriptions are re-established after node failure.
2. Merging of subscriptions.
3. Avoiding matching at certain nodes.
4. Exact unsubscribe semantics (immediate vs. delayed).

Probably more.

Anyway, the whole topic is too complex to devise a correct solution 
without actually implemeting it.

> Martin, if there's anything I can do to help give me a shout.

Writing the user guide is worth more than writing 10k lines of code :)

Martin



More information about the zeromq-dev mailing list