Closed switschel closed 2 months ago
This is due the current implementation and concept that multiple mappings (different mappingTopic) could be linked to the same subscription (same subscriptionTopic).
activating/deactivating a mapping means that the messages are still received but not processed.
An other case where two mappings listen to the same topic is the following:
They both consume the same messages but process them differently.
If you deactivate mapping-event and unsubscribe from panel, the other mapping mapping-alarm is deactivated as well. Which might not be what you want.
We could come up with a logic that checks if there is any mapping active that subscribes on a topic and if so only start subscribing on that topic and vice versa if there is no other mapping active that subscribes on that topic we just unsubscribe.
But I would see that as a nice-to-have feature, so low priority currently.
Changed the implementation to only subscribe to a topic if any mapping is active. Changes are included in: a4a6c4993730075893d0b73efe0a70e4c4a02f9a Could you pls. test if this fixes the issue?
Currently the mapper subscribes to topics even the mapping is not activated.