Common Questions
If you are familiar with the web and email then you will probably find, as I did, that MQTT is very different. These are some of the questions I had, and saw on other sites and forums that may clear things up a little.Q, Can multiple client publish to the same topic?
A- YesQ- Is is possible to know the identity of the client that published a message?
A- No not unless the client includes that information in the topic or payload.Q- What happens to messages that get published to topics that no one subscribes to?
A- They are discarded by the broker.Q-How can I find out what topics have been published?
A- You can’t do this easily as the broker doesn’t seem to keep a list of published topics as they aren’t permanent.Q- Can I subscribe to a topic that no one is publishing to?
A- YesQ- Are messages stored on the broker?
A- Yes but only temporarily. Once they have been sent to all subscribers they are then discarded. But see next question.Q- What are retained messages?
A- When you publish a message you can have the broker store the last published message. This message will be the first message that new subscribers see when they subscribe to that topic. MQTT only retains 1 message.