{"id":21185,"date":"2023-08-26T13:19:22","date_gmt":"2023-08-26T05:19:22","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=21185"},"modified":"2023-08-26T13:19:22","modified_gmt":"2023-08-26T05:19:22","slug":"mxyxj-3","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/21185.html","title":{"rendered":"MQTT\u534f\u8bae\u8be6\u89e3"},"content":{"rendered":"

  MQTT\uff08Message Queuing Telemetry Transport\uff09\u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u53d1\u5e03\/\u8ba2\u9605\u6d88\u606f\u4f20\u8f93\u534f\u8bae\uff0c\u5b83\u7684\u8bbe\u8ba1\u76ee\u6807\u662f\u4e3a\u4f4e\u5e26\u5bbd\u548c\u4e0d\u53ef\u9760\u7f51\u7edc\u73af\u5883\u4e0b\u7684\u8fdc\u7a0b\u8bbe\u5907\u63d0\u4f9b\u53ef\u9760\u7684\u6d88\u606f\u4f20\u8f93\u3002MQTT\u534f\u8bae\u53ef\u4ee5\u7528\u4e8e\u5404\u79cd\u7c7b\u578b\u7684\u7f51\u7edc\uff0c\u4f8b\u5982\u4e13\u7528\u7684\u4f20\u611f\u5668\u7f51\u7edc\uff0c\u5bbd\u5e26\u63a5\u5165\u7f51\u7edc\uff0c\u6709\u7ebf\u7f51\u7edc\uff0c\u4ee5\u53ca\u65e0\u7ebf\u7f51\u7edc\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bbaMQTT\u534f\u8bae\u7684\u529f\u80fd\uff0c\u7279\u70b9\uff0c\u4ee5\u53ca\u5b83\u5982\u4f55\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7ba1\u7406\u8fdc\u7a0b\u8bbe\u5907\u3002<\/p>\n

MQTT\u534f\u8bae\u6982\u8ff0<\/h2>\n

  MQTT\u534f\u8bae\u662f\u4e00\u79cd\u57fa\u4e8e\u5ba2\u6237\u7aef\/\u670d\u52a1\u5668\u7684\u53d1\u5e03\/\u8ba2\u9605\u6d88\u606f\u4f20\u8f93\u534f\u8bae\uff0c\u5b83\u901a\u5e38\u7528\u4e8e\u79fb\u52a8\u8bbe\u5907\u548c\u4f4e\u529f\u8017\u7684\u7f51\u7edc\u73af\u5883\uff0c\u4f8b\u5982\u5bb6\u5ead\u81ea\u52a8\u5316\uff0c\u667a\u80fd\u5bb6\u5c45\uff0c\u7269\u8054\u7f51\u7b49\u3002MQTT\u534f\u8bae\u4f7f\u7528\u7b80\u5355\u7684\u6d88\u606f\u683c\u5f0f\uff0c\u5141\u8bb8\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u8fdb\u884c\u53cc\u5411\u901a\u4fe1\u3002\u5ba2\u6237\u7aef\u53ef\u4ee5\u53d1\u5e03\u6d88\u606f\u5230\u670d\u52a1\u5668\uff0c\u4e5f\u53ef\u4ee5\u8ba2\u9605\u6d88\u606f\uff0c\u4ee5\u4fbf\u5728\u670d\u52a1\u5668\u53d1\u5e03\u65b0\u6d88\u606f\u65f6\u6536\u5230\u901a\u77e5\u3002MQTT\u534f\u8bae\u8fd8\u652f\u6301\u6d88\u606f\u7684\u4f18\u5148\u7ea7\uff0c\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u91cd\u8981\u7684\u6d88\u606f\u88ab\u4f18\u5148\u5904\u7406\u3002MQTT\u534f\u8bae\u7684\u53e6\u4e00\u4e2a\u4f18\u70b9\u662f\u5b83\u53ef\u4ee5\u5728\u7f51\u7edc\u73af\u5883\u4e0d\u53ef\u9760\u7684\u60c5\u51b5\u4e0b\u4fdd\u6301\u6d88\u606f\u7684\u53ef\u9760\u4f20\u8f93\uff0c\u8fd9\u5728\u79fb\u52a8\u7f51\u7edc\u73af\u5883\u4e2d\u5c24\u5176\u6709\u7528\u3002<\/p>\n

MQTT\u534f\u8bae\u7684\u7279\u6027<\/h2>\n

\u7b80\u5355\u7684\u6d88\u606f\u683c\u5f0f<\/h3>\n

  MQTT\u534f\u8bae\u4f7f\u7528\u7b80\u5355\u7684\u6d88\u606f\u683c\u5f0f\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u53cc\u5411\u901a\u4fe1\u3002\u6d88\u606f\u683c\u5f0f\u7531\u6d88\u606f\u5934\uff0c\u6d88\u606f\u4f53\u548c\u6d88\u606f\u5c3e\u7ec4\u6210\uff0c\u6d88\u606f\u5934\u7528\u4e8e\u6307\u5b9a\u6d88\u606f\u7684\u4f18\u5148\u7ea7\uff0c\u6d88\u606f\u4f53\u7528\u4e8e\u643a\u5e26\u6d88\u606f\u5185\u5bb9\uff0c\u6d88\u606f\u5c3e\u7528\u4e8e\u6807\u8bc6\u6d88\u606f\u7684\u7ed3\u675f\u3002\u6d88\u606f\u683c\u5f0f\u7b80\u5355\uff0c\u4f7f\u5f97MQTT\u534f\u8bae\u53ef\u4ee5\u5728\u4f4e\u5e26\u5bbd\u548c\u4e0d\u53ef\u9760\u7f51\u7edc\u73af\u5883\u4e0b\u5b9e\u73b0\u53ef\u9760\u7684\u6d88\u606f\u4f20\u8f93\u3002<\/p>\n

\u652f\u6301\u6d88\u606f\u4f18\u5148\u7ea7<\/h3>\n

  MQTT\u534f\u8bae\u652f\u6301\u6d88\u606f\u7684\u4f18\u5148\u7ea7\uff0c\u6d88\u606f\u53ef\u4ee5\u88ab\u5206\u4e3a0-7\u7ea7\uff0c\u5176\u4e2d0\u7ea7\u6700\u4f4e\uff0c7\u7ea7\u6700\u9ad8\u3002\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u91cd\u8981\u7684\u6d88\u606f\u88ab\u4f18\u5148\u5904\u7406\uff0c\u800c\u4e0d\u91cd\u8981\u7684\u6d88\u606f\u53ef\u4ee5\u88ab\u5ef6\u540e\u5904\u7406\u3002<\/p>\n

\u652f\u6301\u6709\u6548\u7684\u6d88\u606f\u4f20\u8f93<\/h3>\n

  MQTT\u534f\u8bae\u652f\u6301\u6709\u6548\u7684\u6d88\u606f\u4f20\u8f93\uff0c\u53ef\u4ee5\u786e\u4fdd\u6d88\u606f\u5728\u7f51\u7edc\u73af\u5883\u4e0d\u53ef\u9760\u7684\u60c5\u51b5\u4e0b\u53ef\u9760\u4f20\u8f93\u3002MQTT\u534f\u8bae\u652f\u6301\u6d88\u606f\u7684\u53d1\u5e03\/\u8ba2\u9605\uff0c\u4ee5\u53ca\u6d88\u606f\u7684\u786e\u8ba4\/\u62d2\u7edd\u7b49\u529f\u80fd\uff0c\u4f7f\u5f97\u6d88\u606f\u53ef\u4ee5\u53ef\u9760\u5730\u4f20\u8f93\u5230\u76ee\u6807\u5ba2\u6237\u7aef\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  MQTT\u534f\u8bae\u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u53d1\u5e03\/\u8ba2\u9605\u6d88\u606f\u4f20\u8f93\u534f\u8bae\uff0c\u53ef\u4ee5\u7528\u4e8e\u5404\u79cd\u7c7b\u578b\u7684\u7f51\u7edc\uff0c\u4f8b\u5982\u4e13\u7528\u7684\u4f20\u611f\u5668\u7f51\u7edc\uff0c\u5bbd\u5e26\u63a5\u5165\u7f51\u7edc\uff0c\u6709\u7ebf\u7f51\u7edc\uff0c\u4ee5\u53ca\u65e0\u7ebf\u7f51\u7edc\u3002<\/strong>MQTT\u534f\u8bae\u5177\u6709\u7b80\u5355\u7684\u6d88\u606f\u683c\u5f0f\uff0c\u652f\u6301\u6d88\u606f\u4f18\u5148\u7ea7\uff0c\u4ee5\u53ca\u652f\u6301\u6709\u6548\u7684\u6d88\u606f\u4f20\u8f93\u7b49\u4f18\u70b9\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7ba1\u7406\u8fdc\u7a0b\u8bbe\u5907\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

MQTT\uff08MessageQueuingTelemetryTransport\uff09\u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u53d1\u5e03\/\u8ba2\u9605\u6d88\u606f\u4f20\u8f93\u534f\u8bae\uff0c\u5b83\u7684\u8bbe\u8ba1\u76ee\u6807\u662f\u4e3a\u4f4e\u5e26\u5bbd\u548c\u4e0d\u53ef\u9760\u7f51\u7edc\u73af\u5883\u4e0b\u7684\u8fdc\u7a0b\u8bbe\u5907<\/p>\n","protected":false},"author":1,"featured_media":3671,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[46],"class_list":["post-21185","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-m"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/21185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=21185"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/21185\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/3671"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=21185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=21185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=21185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}