{"id":79110,"date":"2024-01-08T23:04:13","date_gmt":"2024-01-08T15:04:13","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=79110"},"modified":"2024-01-08T23:04:13","modified_gmt":"2024-01-08T15:04:13","slug":"mkffwqljsjdgj","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/79110.html","title":{"rendered":"MQTT\u5f00\u653e\u670d\u52a1\u5668\uff1a\u8fde\u63a5\u4e16\u754c\u7684\u5173\u952e"},"content":{"rendered":"
MQTT\u5f00\u653e\u670d\u52a1\u5668\u662f\u5f53\u4eca\u4e92\u8054\u7f51\u4e16\u754c\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u57fa\u7840\u67b6\u6784\u4e4b\u4e00\u3002\u672c\u6587\u5c06\u5e26\u60a8\u6df1\u5165\u63a2\u7d22MQTT\u5f00\u653e\u670d\u52a1\u5668\u7684\u5de5\u4f5c\u539f\u7406\u3001\u5e94\u7528\u573a\u666f\u4ee5\u53ca\u672a\u6765\u53d1\u5c55\u8d8b\u52bf\uff0c\u8ba9\u60a8\u5bf9\u8fd9\u4e00\u5173\u952e\u6280\u672f\u6709\u66f4\u6df1\u5165\u7684\u4e86\u89e3\u3002<\/p>\n
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\u57fa\u4e8eTCP\/IP\u534f\u8bae\u6808\u6784\u5efa\uff0c\u4e13\u6ce8\u4e8e\u4f4e\u5e26\u5bbd\u3001\u9ad8\u5ef6\u8fdf\u6216\u4e0d\u53ef\u9760\u7f51\u7edc\u73af\u5883\u4e0b\u7684\u901a\u4fe1\u3002MQTT\u5f00\u653e\u670d\u52a1\u5668\u4f5c\u4e3a\u6d88\u606f\u4e2d\u4ecb\uff0c\u88ab\u5e7f\u6cdb\u7528\u4e8e\u7269\u8054\u7f51\uff08IoT\uff09\u7b49\u9886\u57df\u3002\u4e0b\u9762\u5c06\u6df1\u5165\u63a2\u8ba8MQTT\u5f00\u653e\u670d\u52a1\u5668\u7684\u5de5\u4f5c\u539f\u7406\u3002<\/p>\n
MQTT\u534f\u8bae\u91c7\u7528\u53d1\u5e03\/\u8ba2\u9605\u6a21\u5f0f\uff0c\u6d88\u606f\u53d1\u5e03\u8005\uff08Publisher\uff09\u5c06\u6d88\u606f\u53d1\u5e03\u5230\u7279\u5b9a\u7684\u4e3b\u9898\uff08Topic\uff09\uff0c\u800c\u6d88\u606f\u8ba2\u9605\u8005\uff08Subscriber\uff09\u5219\u901a\u8fc7\u8ba2\u9605\u611f\u5174\u8da3\u7684\u4e3b\u9898\uff0c\u63a5\u6536\u76f8\u5173\u6d88\u606f\u3002\u8fd9\u79cd\u6a21\u5f0f\u4f7f\u5f97MQTT\u80fd\u591f\u8f7b\u677e\u5e94\u5bf9\u5927\u89c4\u6a21\u8bbe\u5907\u7684\u6570\u636e\u4f20\u8f93\u9700\u6c42\u3002<\/p>\n
MQTT\u5f00\u653e\u670d\u52a1\u5668\u901a\u5e38\u7531Broker\u548cClient\u7ec4\u6210\u3002Broker\u4f5c\u4e3a\u4e2d\u95f4\u4ef6\uff0c\u8d1f\u8d23\u6d88\u606f\u7684\u8f6c\u53d1\u548c\u5904\u7406\uff0c\u800cClient\u5219\u8d1f\u8d23\u8fde\u63a5\u5230Broker\u5e76\u53d1\u9001\/\u63a5\u6536\u6d88\u606f\u3002MQTT\u5f00\u653e\u670d\u52a1\u5668\u7684\u67b6\u6784\u7cbe\u5de7\u800c\u9ad8\u6548\uff0c\u4fdd\u8bc1\u4e86\u6570\u636e\u7684\u7a33\u5b9a\u4f20\u8f93\u548c\u9ad8\u6548\u5904\u7406\u3002<\/p>\n
MQTT\u5f00\u653e\u670d\u52a1\u5668\u5728\u5404\u79cd\u9886\u57df\u90fd\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u4ece\u667a\u80fd\u5bb6\u5c45\u5230\u5de5\u4e1a\u81ea\u52a8\u5316\uff0c\u65e0\u4e0d\u5c55\u73b0\u4e86\u5176\u5f3a\u5927\u7684\u901a\u4fe1\u80fd\u529b\u548c\u7075\u6d3b\u6027\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u5c06\u6df1\u5165\u63a2\u8ba8MQTT\u5f00\u653e\u670d\u52a1\u5668\u5728\u4e0d\u540c\u573a\u666f\u4e0b\u7684\u5e94\u7528\u3002<\/p>\n
\u5728\u667a\u80fd\u5bb6\u5c45\u9886\u57df\uff0cMQTT\u5f00\u653e\u670d\u52a1\u5668\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u8bbe\u5907\u95f4\u7684\u901a\u4fe1\uff0c\u5982\u667a\u80fd\u706f\u3001\u667a\u80fd\u63d2\u5ea7\u7b49\u3002\u5b83\u80fd\u591f\u6709\u6548\u5730\u7ba1\u7406\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4ea4\u6362\uff0c\u8ba9\u667a\u80fd\u5bb6\u5c45\u7cfb\u7edf\u66f4\u52a0\u667a\u80fd\u548c\u7a33\u5b9a\u3002<\/p>\n
\u5728\u5de5\u4e1a\u81ea\u52a8\u5316\u9886\u57df\uff0cMQTT\u5f00\u653e\u670d\u52a1\u5668\u4f5c\u4e3a\u8bbe\u5907\u95f4\u5b9e\u65f6\u901a\u4fe1\u7684\u4e2d\u4ecb\uff0c\u4e3a\u5de5\u4e1a\u8bbe\u5907\u7684\u8fdc\u7a0b\u76d1\u63a7\u548c\u63a7\u5236\u63d0\u4f9b\u4e86\u4fbf\u5229\u3002\u5b83\u80fd\u591f\u786e\u4fdd\u8bbe\u5907\u4e4b\u95f4\u7684\u53ca\u65f6\u901a\u4fe1\uff0c\u63d0\u5347\u4e86\u5de5\u4e1a\u751f\u4ea7\u7684\u6548\u7387\u548c\u5b89\u5168\u6027\u3002<\/p>\n
\u968f\u7740\u7269\u8054\u7f51\u548c\u667a\u80fd\u5316\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0cMQTT\u5f00\u653e\u670d\u52a1\u5668\u5c06\u8fce\u6765\u66f4\u5e7f\u9614\u7684\u5e94\u7528\u524d\u666f\u3002\u5b83\u5c06\u6210\u4e3a\u8fde\u63a5\u7269\u8054\u7f51\u8bbe\u5907\u3001\u5b9e\u73b0\u667a\u80fd\u5316\u7ba1\u7406\u7684\u91cd\u8981\u57fa\u7840\u8bbe\u65bd\uff0c\u8fdb\u4e00\u6b65\u63a8\u52a8\u6570\u5b57\u5316\u65f6\u4ee3\u7684\u53d1\u5c55\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
MQTT\u5f00\u653e\u670d\u52a1\u5668\u662f\u5f53\u4eca\u4e92\u8054\u7f51\u4e16\u754c\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u57fa\u7840\u67b6\u6784\u4e4b\u4e00\u3002\u672c\u6587\u5c06\u5e26\u60a8\u6df1\u5165\u63a2\u7d22MQTT\u5f00\u653e\u670d\u52a1\u5668\u7684\u5de5\u4f5c\u539f\u7406\u3001\u5e94\u7528\u573a\u666f\u4ee5\u53ca\u672a\u6765\u53d1\u5c55\u8d8b\u52bf\uff0c\u8ba9\u60a8\u5bf9\u8fd9\u4e00\u5173\u952e\u6280\u672f\u6709\u66f4\u6df1<\/p>\n","protected":false},"author":1,"featured_media":64183,"comment_status":"closed","ping_status":"closed","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-79110","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\/79110","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=79110"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/79110\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/64183"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=79110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=79110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=79110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}