[zeromq-dev] XPUB and unsubscribe notification message count (bug or not?)

Pieter Hintjens ph at imatix.com
Wed Nov 13 11:48:25 CET 2013


Hi Michael,

The messages are generated inside XPUB... I think the verbose option
isn't doing anything for unsubscribes, which it should, to be
consistent.

-Pieter

On Tue, Nov 12, 2013 at 9:26 PM, Michael Haberler <mail17 at mah.priv.at> wrote:
>
> found the Meerkat article on Pieter's blog with an opaque reference to this behavior: http://hintjens.com/blog:37 (Step 4..)
>
> other than the article says, unsubscribe messages are actually sent, just only on the last unsubscribe; 'on every unsubscribe' would be advantageous over DEALER/ROUTER as suggested by the Census pattern because it would allow to properly track subscriber count even if a client exits abnormally and maybe has no more chance to say so on a DEALER/ROUTER pair.
>
> Any plans to fix that up? Just need to know so I can do a temporary fix or need to change the pattern.
>
> -m
>
>
>
> Am 12.11.2013 um 20:25 schrieb Michael Haberler <mail17 at mah.priv.at>:
>
>> I'm puzzled by the following behaviour (trying to track subscriber count per topic):
>>
>> XPUB server, XPUB_VERBOSE set
>> server tracks messages received on XPUB socket
>>
>> single client:
>> client 1: SUB socket, connects to server, subscribes to 'topic' -> server receives subscribe message (\001topic)
>> client 1 exits: server receives unsubscribe message (\000topic) -  as expected.
>>
>> multiple clients subscribing to same topic:
>>
>> client 1: SUB socket, connects to server, subscribes to 'topic' -> server receives subscribe message (\001topic)
>> client 2: SUB socket, connects to server, subscribes to 'topic' -> server receives subscribe message (\001topic)
>> client 1 exits: ---> no unsubscribe message received! (I would expect an unsubscribe message here)
>> client 2 exits: server receives unsubscribe message (\000topic)
>>
>> Same situation with 3 clients: only the last unsubscribe generates a unsubscribe message
>>
>> Is this as expected? Am I overlooking something? if not - happy to provide an example to reproduce, versions etc
>>
>> thanks in advance
>>
>> Michael
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



-- 
-
Pieter Hintjens
CEO of iMatix.com
Founder of ZeroMQ community
blog: http://hintjens.com



More information about the zeromq-dev mailing list