UNSUBALL : Cancel all subscriptions.

1,070 views
Skip to first unread message

ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)

unread,
Jul 19, 2014, 11:23:38 AM7/19/14
to mq...@googlegroups.com
Hi,
Suppose, the MQTT protocol has another command - UNSUBALL. When the broker receives this command, it interprets it as multiple UNSUBSCRIBE command for every topic the given client has subscribed to. And, so in response, the broker sends those many UNSUBACK responses. Or, perhaps, one UNSUBALL with reason codes as 0 (all un-subscribed), 1 (total failure), 2 (partially un-subscribed) and topic strings that were unsubscribed.

When developing a MQTT client, one can maintain a local store of the topics subscribed and then issue UNSUBSCRIBE to all these in a loop. However, with this command the overhead of maintaining such a store would be removed.

Thoughts, opinions on this "lazy weekend" idea ?

Regards,
Nagesh

Ian Craggs

unread,
Jul 20, 2014, 9:18:19 AM7/20/14
to mq...@googlegroups.com
When we implemented MQTT servers in IBM in the 2000s, we used to treat "unsubscribe #" as special, to do as you describe and delete all subscriptions (only one unsuback was returned).  This was at the suggestion of Andy Stanford-Clark, as far as I remember.  However, some of the people working on the MQTT 3.1.1 standardization didn't like this option, so it wasn't included.   You can achieve something similar of course, by connecting non-cleansession.

Ian

Rahul Gupta

unread,
Jul 20, 2014, 11:55:10 AM7/20/14
to mq...@googlegroups.com
Some of the discussion details are available in this JIRA.

https://issues.oasis-open.org/browse/MQTT-64


--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)

unread,
Jul 21, 2014, 5:07:27 AM7/21/14
to mq...@googlegroups.com

# is a broker wide wild card. Whereas I was thinking client wide 'wild card'.

A UNSUBALL allows an easy way for 'factory reset'.

Sent from phone. Pardon brevity and lingiuistic mistakes.

Paul Fremantle

unread,
Jul 21, 2014, 11:42:38 AM7/21/14
to mq...@googlegroups.com
Nagesh

This would be worth putting to the working group for the next phase of spec'ing. However, as described above, a disconnect followed by a reconnect with clean session= true will achieve the same. Since you are aiming to stop getting all notifications, I think it is reasonable that you would momentarily disconnect.

Paul


--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.



--
Paul Fremantle
Part-time PhD student - School of Computing
twitter: pzfreo / skype: paulfremantle / blog: http://pzf.fremantle.org
CTO and Co-Founder, WSO2
OASIS WS-RX TC Co-chair, Apache Member
07740 199 729
Reply all
Reply to author
Forward
0 new messages