I saw it today when I was fixing my xmpp server…
I recall mqtt being a standard for getting measurements from iot devices?
So is it for sending data…or receiving… Both? Neither? Am I fundamentally misunderstanding what mqtt is?
MQTT is a message bus. It is indeed often used for IoT devices. I haven’t played with ejabberd in about a decade, but pparently it is now also an MQTT server, or broker as they are called in the jargon. You learn something new everyday!
MQTT is just a messaging protocol, it’s mostly used for iot purposes like you mention, but can in theory be used for any kind of project.
Never used ejabberd, but one of their selling points are multiprotocol support, so it’s not so weird to support a multipurpose standardized messaging protocol.
mqtt works topic based. It is for sending and recieving messages. You’ll need a broker to distribute the messages. Every client can subscribe to list of topics, the broker saves that list. If a client sends a new message with the topic
foo
, the broker recieves it and will try to send it to every subscriber offoo
. When some client is offline and comes back up later the broker will still send it to them. Therefore it is great for IoT and smart Home devices