# Dynamic subscription unsubscribe-from-all (and docs)

**URL:** <https://discourse.nodered.org/t/dynamic-subscription-unsubscribe-from-all-and-docs/67675>\
**Category:** Feature Requests\
**Tags:** mqtt\
**Created:** [14 September 2022 06:07 UTC](https://discourse.nodered.org/t/dynamic-subscription-unsubscribe-from-all-and-docs/67675 "2022-09-14T06:07:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tymarbut](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@tymarbut](https://discourse.nodered.org/u/tymarbut)\
**Post date:** [14 September 2022 06:07 UTC](https://discourse.nodered.org/t/dynamic-subscription-unsubscribe-from-all-and-docs/67675/1 "2022-09-14T06:07:11Z")

</div>

Hi all,

This may be a question specifically for @Steve-Mcl - I've been looking everywhere for documentation of the new Dynamic Subscription feature in the MQTT Input node, and just can't find it. I did find [this discussion](https://discourse.nodered.org/t/dynamic-subscribe-mqtt/45656) and [this GitHub](https://github.com/node-red/designs/blob/master/designs/dynamic-mqtt-node.md) page, but they don't seem to be up to date.

I'm hoping there's a way to tell an MQTT In node to unsubscribe from all topics it's currently subscribed to. That would be very helpful, rather than maintaining my own list of the previously-subscribed topics. I tried msg.action = "unsubscribe" with msg.topic = "\*" as a guess, but that wasn't it. Is there currently a way to do this?

And are there any plans for updating the node info that displays in the info panel at the right? There's no info displayed currently, at least on my freshly-upgraded v3.0.2, node.js v16.

Thank you very much for your work on this node up to this point - dynamic subscriptions were obviously an important capability to have.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 September 2022 06:43 UTC](https://discourse.nodered.org/t/dynamic-subscription-unsubscribe-from-all-and-docs/67675/2 "2022-09-14T06:43:06Z")

</div>

> [@tymarbut](#):
>
> I'm hoping there's a way to tell an MQTT In node to unsubscribe from all topics it's currently subscribed to

Set...

- `msg.action`: "unsubscribe"
- `msg.topic`: true

> [@tymarbut](#):
>
> That would be very helpful, rather than maintaining my own list of the previously-subscribed topics.

You can send an `action` of `"getSubscriptions"` then use the result to unsubscribe.

Demos on forum...

- A clean simple demo: [Dynamic MQTT node's "actions-\>connect" guidance needed - #2 by Steve-Mcl](https://discourse.nodered.org/t/dynamic-mqtt-nodes-actions-connect-guidance-needed/58878/2)
- A full demo including "unsubscribe all" & "get subscriptions": [Dynamic MQTT LWT birth, Close & Will Property - #2 by Steve-Mcl](https://discourse.nodered.org/t/dynamic-mqtt-lwt-birth-close-will-property/58951/2)

> [@tymarbut](#):
>
> And are there any plans for updating the node info that displays in the info panel at the right? There's no info displayed currently,

There is info...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae461b7c93d9ae05a21ad610fb69929b83804cf2.png)  
... however, as always, it could be improved.

Pull Requests are welcome (for both the nodes built in documentation and for the node-red website 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 November 2022 06:43 UTC](https://discourse.nodered.org/t/dynamic-subscription-unsubscribe-from-all-and-docs/67675/3 "2022-11-13T06:43:19Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
