# Problem with dynamic MQTT subscription: receiving messages from another topic!

**URL:** <https://discourse.nodered.org/t/problem-with-dynamic-mqtt-subscription-receiving-messages-from-another-topic/73301>\
**Category:** General\
**Tags:** mqtt\
**Created:** [6 January 2023 15:45 UTC](https://discourse.nodered.org/t/problem-with-dynamic-mqtt-subscription-receiving-messages-from-another-topic/73301 "2023-01-06T15:45:53Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [9 January 2023 09:38 UTC](https://discourse.nodered.org/t/problem-with-dynamic-mqtt-subscription-receiving-messages-from-another-topic/73301/21 "2023-01-09T09:38:11Z")

</div>

> [@Steve-Mcl](#):
>
> `{ topic: true, action: "unsubscribe" }`

I looked for a unsubscribe all in node help, could not see it documented. Did i miss it or does it need to be added.

---

<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:** [9 January 2023 09:44 UTC](https://discourse.nodered.org/t/problem-with-dynamic-mqtt-subscription-receiving-messages-from-another-topic/73301/22 "2023-01-09T09:44:19Z")

</div>

I seem to remember it is undocumented - but I cannot remember if it was deliberately undocumented 🤔 . There is 1 other undocumented feature: `action: "getSubscriptions"` that can be used to get current subscriptions (that can be used directly to an unsubscribe action)

---

<div class="post-metadata">

**Author:** ![SuperNinja](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/superninja/32/5761_2.png) [@SuperNinja](https://discourse.nodered.org/u/SuperNinja)\
**Post date:** [9 January 2023 10:18 UTC](https://discourse.nodered.org/t/problem-with-dynamic-mqtt-subscription-receiving-messages-from-another-topic/73301/23 "2023-01-09T10:18:40Z")

</div>

Great, it's simple. The getSubscriptions is useful. Glad to have unearthed hidden functions 😉

---

<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:** [23 January 2023 10:19 UTC](https://discourse.nodered.org/t/problem-with-dynamic-mqtt-subscription-receiving-messages-from-another-topic/73301/24 "2023-01-23T10:19:33Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/problem-with-dynamic-mqtt-subscription-receiving-messages-from-another-topic/73301.md?page=1)
