Re: [zeromq-dev] Multi subscribe and single unsubscribe

2016-02-11 Thread Axel Voitier
That is the expected behaviour, yes.
Subscriptions are said to be additive and idempotent. That is, if you
subscribe twice to the same topic you have to unsubscribe twice to stop
receiving it (provided it is not matched by another subscribe).


Cheers,
Axel

--
Contact: axel.voit...@gmail.com
Secure: axel.voit...@protonmail.ch

2016-02-11 12:17 GMT+01:00 Navneet Kumar :

> Hello everyone,
>
> I was testing with PUB-SUB and found that
> When I subscribe to a topic twice, then unsubscribe once,
> and again subscribe I receive all messages.
> Messages queued at the PUB when I unsubscribed only once.
>
> However if I unsubscribe twice or subscribe only once and unsubscribe once.
> I will get messages only after the next subscribe.
>
> I wanted to know the internal mechanism of how the PUB handles
> multiple subscribe and unsubscribe messages and when does it
> queue messages for the client.
>
>
> Thanks
> --
> Navneet Kumar
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Multi subscribe and single unsubscribe

2016-02-11 Thread Navneet Kumar
Hello everyone,

I was testing with PUB-SUB and found that
When I subscribe to a topic twice, then unsubscribe once,
and again subscribe I receive all messages.
Messages queued at the PUB when I unsubscribed only once.

However if I unsubscribe twice or subscribe only once and unsubscribe once.
I will get messages only after the next subscribe.

I wanted to know the internal mechanism of how the PUB handles
multiple subscribe and unsubscribe messages and when does it
queue messages for the client.


Thanks
-- 
Navneet Kumar
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev