CShark-Hub / Mako-IoT.Home

🏠 The landing page for MakoIoT project.
Other
0 stars 0 forks source link

Adjust MQTT broadcast topics #58

Open torbacz opened 1 year ago

torbacz commented 1 year ago

Currently we've got two topics one for commands and one for broadcast Broadcast: $"{_config.TopicPrefix}/{broadcastTopicPrefix}/{messageType}"; Commands: $"{_config.TopicPrefix}/{directTopicPrefix}/{recipient}"

In multi device scenario, with the same devices, there will be conflict. For example, we've got 2 the same devices sending the same data. Both will override data on broadcast topic. I would recommend to include ClientId from config into topics: Broadcast: $"{_config.TopicPrefix}/{ClientId }/{broadcastTopicPrefix}/{messageType}"; Commands: $"{_config.TopicPrefix}/{ClientId}/{directTopicPrefix}"