mqtt-datasource
mqtt-datasource copied to clipboard
fix: reuse session to receive data from subscriptions after reconnect
In case of a mqtt reconnect event with the current configuration the subscriptions will not be recreated after the auto reconnect. As a result, the panels no longer receive any data. Refreshing the browser doesn't help.
There are to ways to fix that:
- We need to set all topic states to unsubscribed in case of a disconnect and recreate the subscriptions after a successful reconnect.
- Set the clean session config to false. Than the broker will reactivate all subscriptions for that client id automatically and will publish data right after reconnecting. (my suggestion)