After publishing an IoT MQTT message to a specific topic, my "sender program" receives this message as member from this specific topic. I understand that this is the "normal" process of the broker.
My issue is how to separate the incoming messages coming either from me (as said before) or from another user (which I have to process).
I found a solution proposed in a Chat exemple : each user add his specific ID at the end of the Topic name. Then, it is possible when receiving a message to test the "extension" of the topic name of the sender and to be able to diffrentiate the origin.
Is that the best practice ?
If yes, do I have to put a slash (/) between the Topic Name and the extension (it works fine without)
And finally, what is the purpose of the ClientID declared in the "Initialize" MQTT starting process ?
Thanks for your help
My issue is how to separate the incoming messages coming either from me (as said before) or from another user (which I have to process).
I found a solution proposed in a Chat exemple : each user add his specific ID at the end of the Topic name. Then, it is possible when receiving a message to test the "extension" of the topic name of the sender and to be able to diffrentiate the origin.
Is that the best practice ?
If yes, do I have to put a slash (/) between the Topic Name and the extension (it works fine without)
And finally, what is the purpose of the ClientID declared in the "Initialize" MQTT starting process ?
Thanks for your help