{"id":22978,"date":"2019-04-25T02:52:54","date_gmt":"2019-04-25T09:52:54","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=22978"},"modified":"2020-06-01T18:43:52","modified_gmt":"2020-06-02T01:43:52","slug":"how-mqtt-works","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/how-mqtt-works\/","title":{"rendered":"How MQTT Works?"},"content":{"rendered":"<p>MQTT (Message Queuing Telemetry Transport) is a lightweight protocol where clients can publish and subscribe to messages. MQTT protocol is designed for constrained devices that operate with low-bandwidth.<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/mqtt-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-22981 aligncenter\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/mqtt-1.png\" alt=\"\" width=\"480\" height=\"319\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/mqtt-1.png 480w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/mqtt-1-300x199.png 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<h3><strong>MQTT Basics<\/strong><\/h3>\n<p>Here are some of the basic MQTT concepts,<\/p>\n<ul>\n<li>MQTT Publish<\/li>\n<li>MQTT Subscribe<\/li>\n<li>MQTT Messages<\/li>\n<li>Topics<\/li>\n<li>MQTT Broker<\/li>\n<\/ul>\n<h3><strong>Related Topics<\/strong><\/h3>\n<ul>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/how-mqtt-works\/\">How MQTT works?<\/a><\/li>\n<li>MQTT \u2013 Connect to Broker\n<ul>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-connect-to-eclipse-public-mqtt-server\/\">Connect to Eclipse public MQTT Server<\/a><\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-connect-to-mosquitto-broker-on-local-windows-machine\/\">Connect to Mosquitto MQTT server on local Windows machine<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-topics\/\">MQTT Topics<\/a><\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-publish\/\">MQTT Publish<\/a><\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-subscriber\/\">MQTT Subscribe<\/a><\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-quality-of-service-qos\/\">MQTT Quality of Service (QoS)<\/a><\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-keep-alive-pingreq-pingresp\/\">MQTT &#8211; Keep Alive with PINGREQ and PINGRESP<\/a><\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/install-mqtt-broker-mosquitto-in-windows\/\">Install MQTT broker Mosquitto in Windows<\/a><\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-user-authentication\/\">Mosquitto Broker \u2013 Enable user authentication<\/a><\/li>\n<li><a href=\"https:\/\/m2msupport.net\/m2msupport\/mqtt-user-name-and-password-authentication-to-mqtt-broker-connection\/\">MQTT Broker connection with user name and password<\/a><\/li>\n<\/ul>\n<h3><strong>MQTT Publish<\/strong><\/h3>\n<p>Devices can publish messages periodically. For example, a device can publish its temperature sensor readings periodically. In the above illustrated example, Device 1 is publishing messages under the topic \/dev1\/topic1 and Device 2 is publishing messages under topic \/dev2\/topic1.<\/p>\n<h3><strong>MQTT Subscribe<\/strong><\/h3>\n<p>Devices can subscribe to messages from other devices.&nbsp; In the above illustrated example, Device 1 is subscribed to messages from Device 2 for the topic \/dev2\/topic1 and Device 2 is is subscribed to messages from Device 1 for the topic \/dev1\/topic1<\/p>\n<h3><strong>MQTT Topics<\/strong><\/h3>\n<p>Devices publish messages under a topic name. Devices can publish messages under different topics.<\/p>\n<h3><strong>MQTT Messages<\/strong><\/h3>\n<p>MQTT messages are the actual information that the device publishes.<\/p>\n<h3><strong>MQTT Broker<\/strong><\/h3>\n<p>MQTT Broker is the intermediary that is responsible for receiving all the messages published by the clients (devices), filtering the messages and sending the messages to the subscribed clients.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MQTT (Message Queuing Telemetry Transport) is a lightweight protocol where clients can publish and subscribe to messages. MQTT protocol is designed for constrained devices that operate with low-bandwidth. MQTT Basics Here are some of the basic MQTT concepts, MQTT Publish &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/how-mqtt-works\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"software_howto.php","meta":{"footnotes":""},"class_list":["post-22978","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/22978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/comments?post=22978"}],"version-history":[{"count":9,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/22978\/revisions"}],"predecessor-version":[{"id":144418,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/22978\/revisions\/144418"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=22978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}