Regarding the dynamic subscription of MQTT from version 2.1.0, I've noticed that if you feed a MQTT node with several topics for subscription (one after another as separate msg's), the node will "remember" the topics and act well.
But, there is no way to know to what topics the node is already subscribed (unless the user takes care of this elsewhere). What I mean is that the node does not have a report status which it can output all of its subscribed topics (and maybe some more info).
One way I thought to deal with this is to remove all subscribed topics by sending a msg with action 'unsubscribe' and with topic '#" but this doesn't work.
Would like to know if there is a way to clear all subscribed topics without knowing what they are...
I am sure it is just a lack of imagination on my part, but as a regular user of the MQTT nodes before this addition, do you have a sample case where it would make since to use the dynamic setting capability?
There are a number of scenarios that were hard to do without the dynamic mode.
The following are scenarios that I've come across from time to time
running on a device with intermittent connectivity and wanting to schedule the connect/disconnect, rather than being 'always' connected
connecting to a service that dynamically provisions the connection details. Such as having a standard set of flows that are deploy to multiple machines, and each machine has to "call home" to a provisioning service to get the broker details it should connect to.
an mqtt service that rotates credentials regularly so you cannot hard-code them in the flow
a service that has to 'discover' it's topic tree based on events so cannot be hardcoded
It is certainly a feature that most mqtt users won't need... Until you need it, then you really need it.