• In reality it's pretty simple for the main use cases, it's just that the spec's trying to cram lots of stuff about the binary format and random quality of service stuff in (that doesn't really apply over a normal TCP/IP connection anyway).

    The super quick intro is:

    • You have the idea of 'topics', which are just a path, separated with /
    • You can 'subscribe' to a topic, in which case you get told whenever that topic changes. You can use wildcards to subscribe to certain types of topic as well - so my/topic/#
    • You can 'publish' a topic, which tells everyone that subscribed that the topic has changed
    • The MQTT broker does all the smart stuff, and the clients pretty much just connect, issue subscribe/publish messages, and receive data when a topic changes

    There's also https://www.hivemq.com/blog/mqtt-essenti­als-part-1-introducing-mqtt/ which I seem to remember was pretty good. You can gloss over most of it as it's a bit much in places, but later on (part 5?) there's more useful info about publish/subscribe

    If you want a slightly less scary intro, look at @Ollie's tinyMQTT:

    http://www.espruino.com/tinyMQTT
    http://www.espruino.com/modules/tinyMQTT­.js

    It's not crazy complex, it's just shifting a few bytes around.

About

Avatar for Gordon @Gordon started