[zeromq-dev] Multi subscribe and single unsubscribe

Axel Voitier axel.voitier at gmail.com
Thu Feb 11 14:05:09 CET 2016


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.voitier at gmail.com
Secure: axel.voitier at protonmail.ch

2016-02-11 12:17 GMT+01:00 Navneet Kumar <navneet.krg at gmail.com>:

> 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 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/20160211/d0cde204/attachment.htm>


More information about the zeromq-dev mailing list