{"id":2983,"date":"2023-07-14T17:56:42","date_gmt":"2023-07-14T09:56:42","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=2983"},"modified":"2023-07-14T17:56:43","modified_gmt":"2023-07-14T09:56:43","slug":"%e9%80%9a%e8%bf%87%e5%b7%a5%e5%8e%82%e6%a8%a1%e5%bc%8f%e5%ae%9e%e7%8e%b0springbootmqtt-%e8%ae%a2%e9%98%85%e4%b8%8e%e6%b6%88%e8%b4%b9","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/%e9%80%9a%e8%bf%87%e5%b7%a5%e5%8e%82%e6%a8%a1%e5%bc%8f%e5%ae%9e%e7%8e%b0springbootmqtt-%e8%ae%a2%e9%98%85%e4%b8%8e%e6%b6%88%e8%b4%b9\/","title":{"rendered":"\u901a\u8fc7\u5de5\u5382\u6a21\u5f0f\u5b9e\u73b0SpringBoot+MQTT-\u8ba2\u9605\u4e0e\u6d88\u8d39"},"content":{"rendered":"<h3 cid=\"n2\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">1.pom.xml<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"xml\" cid=\"n3\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \"><span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">&lt;!-- &nbsp; &nbsp; &nbsp;  \u8fde\u63a5MQTT--&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">&lt;!--mqtt--&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">dependency<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">groupId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span>org.springframework.boot<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">groupId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span>spring-boot-starter-integration<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">dependency<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">dependency<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">groupId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span>org.springframework.integration<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">groupId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span>spring-integration-stream<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">dependency<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">dependency<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">groupId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span>org.springframework.integration<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">groupId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span>spring-integration-mqtt<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">dependency<\/span><span style=\"box-sizing: border-box;color: rgb(17, 119, 0);\">&gt;<\/span><\/span><\/pre>\n<h3 cid=\"n4\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">2.yml\u914d\u7f6e<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"yml\" cid=\"n5\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \"><span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\">mqtt<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">:<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\">  config<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">:<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\"> &nbsp;  username<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">: <\/span>admin<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\"> &nbsp;  password<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">: <\/span>admin <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\"># \u5bc6\u7801<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\"> &nbsp;  hostUrl<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">: <\/span>tcp<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">:<\/span>\/\/xx.xx.xxx.xx<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">:<\/span>1883 <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\"># tcp:\/\/ip:\u7aef\u53e3<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\"> &nbsp;  clientId<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">: <\/span>emq-ss-client <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\"># \u5ba2\u6237\u7aefid<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\"> &nbsp;  defaultTopic<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">: <\/span>topic_default <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\"># \u8ba2\u9605\u4e3b\u9898<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\"> &nbsp;  timeout<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">: <\/span>1000 <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\"># \u8d85\u65f6\u65f6\u95f4 \uff08\u5355\u4f4d\uff1a\u79d2\uff09<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\"> &nbsp;  keepalive<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">: <\/span>60 <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\"># \u5fc3\u8df3 \uff08\u5355\u4f4d\uff1a\u79d2\uff09<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\"> &nbsp;  enabled<\/span><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">: <\/span>false <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\"># \u662f\u5426\u4f7f\u80fdmqtt\u529f\u80fd<\/span><\/span><\/pre>\n<h3 cid=\"n6\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">3.MqttProperties<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n7\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \"><span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">package<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">com<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">rfos<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">assistsilkworm<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">properties<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">io<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">swagger<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotations<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">ApiModelProperty<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">lombok<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Data<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">boot<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">context<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">properties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">ConfigurationProperties<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">stereotype<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Component<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @Author Michale<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @CreateDate 2022\/9\/4<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @Describe \u8bfb\u53d6mqtt\u914d\u7f6e\u4fe1\u606f<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Data<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Component<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ConfigurationProperties<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">prefix<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"mqtt.config\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">MqttProperties<\/span> {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u7528\u6237\u540d\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">username<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u5bc6\u7801\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">password<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u5730\u5740\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">hostUrl<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u5ba2\u6237\u7aefid\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">clientId<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u8ba2\u9605\u4e3b\u9898\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">defaultTopic<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u8d85\u65f6\u65f6\u95f4\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">int<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">timeout<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u5fc3\u8df3\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">int<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">keepalive<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"mqtt\u5f00\u5173\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">boolean<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">enabled<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\">}<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span><\/pre>\n<p cid=\"n8\" mdtype=\"paragraph\" style=\" box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap; font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start; \">\n<h3 cid=\"n9\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">4.VO\u4f20\u8f93\u5b9e\u4f53\u7c7b<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n10\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \"><span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">package<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">com<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">rfos<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">assistsilkworm<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">vo<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">io<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">swagger<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotations<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">ApiModelProperty<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">lombok<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Data<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @Author rfos<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @Date 2023\/2\/20 17:08<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @Description TODO \u6d88\u606f\u4f53<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Data<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">MqttVO<\/span> {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u8ba2\u9605\u7684\u4e3b\u9898\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> &nbsp; <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topic<\/span> ;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ApiModelProperty<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u53d1\u9001\u7684\u5185\u5bb9\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> &nbsp; <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">payload<\/span> ;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\">}<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span><\/pre>\n<h3 cid=\"n11\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">5.MqttReceiveHandle<\/span><\/h3>\n<p cid=\"n12\" mdtype=\"paragraph\" style=\" box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap; font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start; \">\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n13\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \"><span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">package<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">com<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">rfos<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">assistsilkworm<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">handler<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">lombok<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">extern<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">slf4j<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Slf4j<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">ServiceActivator<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">support<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messaging<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Message<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messaging<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageHandler<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messaging<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessagingException<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">stereotype<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Component<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* mqtt\u5ba2\u6237\u7aef\u6d88\u606f\u5904\u7406\u7c7b<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Slf4j<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Component<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">MqttReceiveHandler<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">implements<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageHandler<\/span> {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Override<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ServiceActivator<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">inputChannel<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"MQTT_INPUT_CHANNEL\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">handleMessage<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Message<\/span><span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">&lt;?&gt;<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">message<\/span>) <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">throws<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessagingException<\/span> {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">log<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">info<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u6536\u5230\u8ba2\u9605\u6d88\u606f: {}\"<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">message<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topic<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">message<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getHeaders<\/span>().<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">get<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">RECEIVED_TOPIC<\/span>).<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">toString<\/span>();<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">log<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">info<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u6d88\u606f\u4e3b\u9898\uff1a{}\"<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topic<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n14\" mdtype=\"paragraph\" style=\" box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap; font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start; \">\n<h3 cid=\"n15\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">6.MqttConfig<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n16\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \"><span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">package<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">com<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">rfos<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">assistsilkworm<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">config<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">com<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">rfos<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">assistsilkworm<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">handler<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttReceiveHandler<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">com<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">rfos<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">assistsilkworm<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">properties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttProperties<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">lombok<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">extern<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">slf4j<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Slf4j<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">eclipse<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">paho<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">client<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttv3<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttConnectOptions<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">beans<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">factory<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Autowired<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">context<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Bean<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">context<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Configuration<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">IntegrationComponentScan<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">ServiceActivator<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">channel<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DirectChannel<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">core<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DefaultMqttPahoClientFactory<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">core<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoClientFactory<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">inbound<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoMessageDrivenChannelAdapter<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">outbound<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoMessageHandler<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">support<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DefaultPahoMessageConverter<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messaging<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Message<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messaging<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageChannel<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messaging<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageHandler<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messaging<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessagingException<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">java<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">util<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Arrays<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">java<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">util<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">List<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* mqtt \u63a8\u9001and\u63a5\u6536 \u6d88\u606f\u7c7b<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Configuration<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@IntegrationComponentScan<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Slf4j<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">MqttConfig<\/span> {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Autowired<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttProperties<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Autowired<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">private<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttReceiveHandler<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttReceiveHandle<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* MQTT\u8fde\u63a5\u5668\u9009\u9879<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Bean<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">value<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"getMqttConnectOptions\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttConnectOptions<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getMqttConnectOptions<\/span>() {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttConnectOptions<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttConnectOptions<\/span>();<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ \u8bbe\u7f6e\u662f\u5426\u6e05\u7a7asession,\u8fd9\u91cc\u5982\u679c\u8bbe\u7f6e\u4e3afalse\u8868\u793a\u670d\u52a1\u5668\u4f1a\u4fdd\u7559\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u8bb0\u5f55\uff0c\u8fd9\u91cc\u8bbe\u7f6e\u4e3atrue\u8868\u793a\u6bcf\u6b21\u8fde\u63a5\u5230\u670d\u52a1\u5668\u90fd\u4ee5\u65b0\u7684\u8eab\u4efd\u8fde\u63a5<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setCleanSession<\/span>(<span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\">true<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ \u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4 \u5355\u4f4d\u4e3a\u79d2<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setConnectionTimeout<\/span>(<span style=\"box-sizing: border-box;color: rgb(17, 102, 68);\">10<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setAutomaticReconnect<\/span>(<span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\">true<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setUserName<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getUsername<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setPassword<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getPassword<\/span>().<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">toCharArray<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setServerURIs<\/span>(<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span>[]{<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getHostUrl<\/span>()});<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ \u8bbe\u7f6e\u4f1a\u8bdd\u5fc3\u8df3\u65f6\u95f4 \u5355\u4f4d\u4e3a\u79d2 \u670d\u52a1\u5668\u4f1a\u6bcf\u96941.5*20\u79d2\u7684\u65f6\u95f4\u5411\u5ba2\u6237\u7aef\u53d1\u9001\u5fc3\u8df3\u5224\u65ad\u5ba2\u6237\u7aef\u662f\u5426\u5728\u7ebf\uff0c\u4f46\u8fd9\u4e2a\u65b9\u6cd5\u5e76\u6ca1\u6709\u91cd\u8fde\u7684\u673a\u5236<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setKeepAliveInterval<\/span>(<span style=\"box-sizing: border-box;color: rgb(17, 102, 68);\">10<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ \u8bbe\u7f6e\u201c\u9057\u5631\u201d\u6d88\u606f\u7684\u8bdd\u9898\uff0c\u82e5\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u8fde\u63a5\u610f\u5916\u4e2d\u65ad\uff0c\u670d\u52a1\u5668\u5c06\u53d1\u5e03\u5ba2\u6237\u7aef\u7684\u201c\u9057\u5631\u201d\u6d88\u606f\u3002<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/mqttConnectOptions.setWill(\"willTopic\", WILL_DATA, 2, false);<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">return<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectOptions<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* MQTT\u5de5\u5382<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Bean<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"mqttClientFactor\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoClientFactory<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttClientFactory<\/span>() {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DefaultMqttPahoClientFactory<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">factory<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DefaultMqttPahoClientFactory<\/span>();<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">factory<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setConnectionOptions<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getMqttConnectOptions<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">return<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">factory<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* MQTT\u4fe1\u606f\u901a\u9053\uff08\u751f\u4ea7\u8005\uff09<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Bean<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"MQTT_OUT_BOUND_CHANNEL\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageChannel<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttOutboundChannel<\/span>() {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">return<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DirectChannel<\/span>();<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* MQTT\u6d88\u606f\u5904\u7406\u5668\uff08\u751f\u4ea7\u8005\uff09<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Bean<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ServiceActivator<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">inputChannel<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"MQTT_OUT_BOUND_CHANNEL\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoMessageHandler<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttOutbound<\/span>() {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoMessageHandler<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messageHandler<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoMessageHandler<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getClientId<\/span>() <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">+<\/span> <span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"_producer\"<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttClientFactory<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messageHandler<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setAsync<\/span>(<span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\">true<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messageHandler<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setDefaultTopic<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getDefaultTopic<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messageHandler<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setAsyncEvents<\/span>(<span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\">true<\/span>); <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ \u6d88\u606f\u53d1\u9001\u548c\u4f20\u8f93\u5b8c\u6210\u4f1a\u6709\u5f02\u6b65\u7684\u901a\u77e5\u56de\u8c03<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/\u8bbe\u7f6e\u8f6c\u6362\u5668 \u53d1\u9001bytes\u6570\u636e<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DefaultPahoMessageConverter<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">converter<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DefaultPahoMessageConverter<\/span>();<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">converter<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setPayloadAsBytes<\/span>(<span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\">true<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">return<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messageHandler<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u914d\u7f6eclient,\u76d1\u542c\u7684topic<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* MQTT\u6d88\u606f\u8ba2\u9605\u7ed1\u5b9a\uff08\u6d88\u8d39\u8005\uff09<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Bean<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"inbound\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoMessageDrivenChannelAdapter<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">inbound<\/span>() {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">List<\/span><span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span><span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topicList<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Arrays<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">asList<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getDefaultTopic<\/span>().<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">trim<\/span>().<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">split<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\",\"<\/span>));<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span>[] <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topics<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span>[<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topicList<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">size<\/span>()];<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topicList<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">toArray<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topics<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoMessageDrivenChannelAdapter<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">adapter<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttPahoMessageDrivenChannelAdapter<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getClientId<\/span>() <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">+<\/span> <span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"_consumer\"<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttClientFactory<\/span>(), <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topics<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">adapter<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setCompletionTimeout<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttProperties<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">getTimeout<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DefaultPahoMessageConverter<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">converter<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DefaultPahoMessageConverter<\/span>();<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">converter<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setPayloadAsBytes<\/span>(<span style=\"box-sizing: border-box;color: rgb(34, 17, 153);\">true<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">adapter<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setConverter<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">converter<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">adapter<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setQos<\/span>(<span style=\"box-sizing: border-box;color: rgb(17, 102, 68);\">2<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp; &nbsp; &nbsp;  adapter.addTopic(\"TOPIC1\");<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/\u8bbe\u7f6e\u8ba2\u9605\u901a\u9053<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">adapter<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">setOutputChannel<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttInputChannel<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">return<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">adapter<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp;  \/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp; &nbsp; * \u83b7\u53d6MQTT\u5ba2\u6237\u7aef<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp; &nbsp; * \u81ea\u5b9a\u4e49\u8ba2\u9605\u6d88\u606f<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp; &nbsp; *\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp;  @Value(\"mqttClient\")<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp;  public IMqttClient getMqttClient() throws MqttException {<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp; &nbsp; &nbsp;  IMqttClient mqttClient = mqttClientFactory().getClientInstance(mqttProperties.getHostUrl(), mqttProperties.getClientId());<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp; &nbsp; &nbsp;  mqttClient.connect(getMqttConnectOptions());<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp; &nbsp; &nbsp;  return mqttClient;<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/ &nbsp;  }<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* MQTT\u4fe1\u606f\u901a\u9053\uff08\u6d88\u8d39\u8005\uff09<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Bean<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"MQTT_INPUT_CHANNEL\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageChannel<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttInputChannel<\/span>() {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">return<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">DirectChannel<\/span>();<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* MQTT\u6d88\u606f\u5904\u7406\u5668\uff08\u6d88\u8d39\u8005\uff09<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">**\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Bean<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@ServiceActivator<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">inputChannel<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"MQTT_INPUT_CHANNEL\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageHandler<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">handler<\/span>() {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">return<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">new<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageHandler<\/span>() {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Override<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">handleMessage<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Message<\/span><span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">&lt;?&gt;<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">message<\/span>) <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">throws<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessagingException<\/span> {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/\/\u5904\u7406\u63a5\u6536\u6d88\u606f<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttReceiveHandle<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">handleMessage<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">message<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp;  };<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n17\" mdtype=\"paragraph\" style=\" box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap; font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start; \">\n<h3 cid=\"n18\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">7.MqttPublishGateway<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n19\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \"><span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">package<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">com<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">rfos<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">assistsilkworm<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">gateway<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessageEndpoint<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MessagingGateway<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">support<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">messaging<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">handler<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">annotation<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Header<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">stereotype<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Service<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* mqtt\u53d1\u9001\u6d88\u606f<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \uff08defaultRequestChannel = \"mqttOutboundChannel\" \u5bf9\u5e94config\u914d\u7f6e\uff09<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* **\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Service<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"mqttGateway\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@MessagingGateway<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">defaultRequestChannel<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"MQTT_OUT_BOUND_CHANNEL\"<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">interface<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">MqttPublishGateway<\/span> {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u53d1\u9001\u4fe1\u606f\u5230MQTT\u670d\u52a1\u5668<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">sendToMqttObject<\/span>(<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Header<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">TOPIC<\/span>) <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topic<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">byte<\/span>[] <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">payload<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u53d1\u9001\u4fe1\u606f\u5230MQTT\u670d\u52a1\u5668<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param topic \u4e3b\u9898<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param payload \u6d88\u606f\u4e3b\u4f53<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">sendToMqtt<\/span>(<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Header<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">TOPIC<\/span>) <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topic<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">payload<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u53d1\u9001\u4fe1\u606f\u5230MQTT\u670d\u52a1\u5668<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param topic \u4e3b\u9898<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param qos \u5bf9\u6d88\u606f\u5904\u7406\u7684\u51e0\u79cd\u673a\u5236\u3002<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* 0 \u8868\u793a\u7684\u662f\u8ba2\u9605\u8005\u6ca1\u6536\u5230\u6d88\u606f\u4e0d\u4f1a\u518d\u6b21\u53d1\u9001\uff0c\u6d88\u606f\u4f1a\u4e22\u5931\u3002<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* 1 \u8868\u793a\u7684\u662f\u4f1a\u5c1d\u8bd5\u91cd\u8bd5\uff0c\u4e00\u76f4\u5230\u63a5\u6536\u5230\u6d88\u606f\uff0c\u4f46\u8fd9\u79cd\u60c5\u51b5\u53ef\u80fd\u5bfc\u81f4\u8ba2\u9605\u8005\u6536\u5230\u591a\u6b21\u91cd\u590d\u6d88\u606f\u3002<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* 2 \u591a\u4e86\u4e00\u6b21\u53bb\u91cd\u7684\u52a8\u4f5c\uff0c\u786e\u4fdd\u8ba2\u9605\u8005\u6536\u5230\u7684\u6d88\u606f\u6709\u4e00\u6b21\u3002<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param payload \u6d88\u606f\u4e3b\u4f53<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">sendToMqtt<\/span>(<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Header<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">TOPIC<\/span>) <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topic<\/span>, <span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Header<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">QOS<\/span>) <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">int<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">qos<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">payload<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u53d1\u9001\u4fe1\u606f\u5230MQTT\u670d\u52a1\u5668<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param topic \u4e3b\u9898<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param payload \u6d88\u606f\u4e3b\u4f53<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">sendToMqtt<\/span>(<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Header<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">TOPIC<\/span>) <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topic<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">Object<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">payload<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u53d1\u9001\u4fe1\u606f\u5230MQTT\u670d\u52a1\u5668<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param topic \u4e3b\u9898<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param payload \u6d88\u606f\u4e3b\u4f53<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">sendToMqtt<\/span>(<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Header<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttHeaders<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">TOPIC<\/span>) <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">String<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">topic<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">byte<\/span>[] <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">payload<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n20\" mdtype=\"paragraph\" style=\" box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap; font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start; \">\n<h3 cid=\"n21\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">8.MqttListener<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n22\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \"><span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">package<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">com<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">rfos<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">assistsilkworm<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">listenter<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">lombok<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">extern<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">slf4j<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Slf4j<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">context<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">event<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">EventListener<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">event<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttConnectionFailedEvent<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">event<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttMessageDeliveredEvent<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">event<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttMessageSentEvent<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">integration<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqtt<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">event<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttSubscribedEvent<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">import<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">org<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">springframework<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">stereotype<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">Component<\/span>;<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Slf4j<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@Component<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 255);\">MqttListener<\/span> {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u8fde\u63a5\u5931\u8d25\u7684\u4e8b\u4ef6\u901a\u77e5<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param mqttConnectionFailedEvent<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@EventListener<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">classes<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttConnectionFailedEvent<\/span>.<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">listenerAction<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttConnectionFailedEvent<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttConnectionFailedEvent<\/span>) {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">log<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">info<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u8fde\u63a5\u5931\u8d25\u7684\u4e8b\u4ef6\u901a\u77e5\"<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u5df2\u53d1\u9001\u7684\u4e8b\u4ef6\u901a\u77e5<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param mqttMessageSentEvent<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@EventListener<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">classes<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttMessageSentEvent<\/span>.<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">listenerAction<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttMessageSentEvent<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttMessageSentEvent<\/span>) {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">log<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">info<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u5df2\u53d1\u9001\u7684\u4e8b\u4ef6\u901a\u77e5[{}]\"<\/span>,<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttMessageSentEvent<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">toString<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u5df2\u4f20\u8f93\u5b8c\u6210\u7684\u4e8b\u4ef6\u901a\u77e5<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* 1.QOS == 0,\u53d1\u9001\u6d88\u606f\u540e\u4f1a\u5373\u53ef\u8fdb\u884c\u6b64\u4e8b\u4ef6\u56de\u8c03\uff0c\u56e0\u4e3a\u4e0d\u9700\u8981\u7b49\u5f85\u56de\u6267<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* 2.QOS == 1\uff0c\u53d1\u9001\u6d88\u606f\u540e\u4f1a\u7b49\u5f85ACK\u56de\u6267\uff0cACK\u56de\u6267\u540e\u4f1a\u8fdb\u884c\u6b64\u4e8b\u4ef6\u901a\u77e5<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* 3.QOS == 2\uff0c\u53d1\u9001\u6d88\u606f\u540e\u4f1a\u7b49\u5f85PubRECV\u56de\u6267\uff0c\u77e5\u9053\u6536\u5230PubCOMP\u540e\u4f1a\u8fdb\u884c\u6b64\u4e8b\u4ef6\u901a\u77e5<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param mqttMessageDeliveredEvent<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@EventListener<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">classes<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttMessageDeliveredEvent<\/span>.<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">listenerAction<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttMessageDeliveredEvent<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttMessageDeliveredEvent<\/span>) {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">log<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">info<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u5df2\u4f20\u8f93\u5b8c\u6210\u7684\u4e8b\u4ef6\u901a\u77e5\"<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">\/**<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* \u6d88\u606f\u8ba2\u9605\u7684\u4e8b\u4ef6\u901a\u77e5<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">* @param mqttSubscribedEvent<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; <span style=\"box-sizing: border-box;color: rgb(170, 85, 0);\">*\/<\/span><\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(85, 85, 85);\">@EventListener<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">classes<\/span> <span style=\"box-sizing: border-box;color: rgb(152, 26, 26);\">=<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttSubscribedEvent<\/span>.<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">class<\/span>)<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(119, 0, 136);\">public<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 136, 85);\">void<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">listenerAction<\/span>(<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">MqttSubscribedEvent<\/span> <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttSubscribedEvent<\/span>) {<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">log<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">info<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u6d88\u606f\u8ba2\u9605\u7684\u4e8b\u4ef6\u901a\u77e5\"<\/span>);<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">log<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">info<\/span>(<span style=\"box-sizing: border-box;color: rgb(170, 17, 17);\">\"\u6210\u529f\u8ba2\u9605\u5230\u4e3b\u9898:  info={}\"<\/span>, <span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">mqttSubscribedEvent<\/span>.<span style=\"box-sizing: border-box;color: rgb(0, 0, 0);\">toString<\/span>());<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\"> &nbsp;  }<\/span>\n<span role=\"presentation\" style=\"box-sizing: border-box;padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n23\" mdtype=\"paragraph\" style=\" box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap; font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start; \">\n<h3 cid=\"n24\" mdtype=\"heading\" style=\" box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem; font-weight: bold;line-height: 1.43;cursor: text;color: green;white-space: pre-wrap;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start; \"><span md-inline=\"plain\" style=\"box-sizing: border-box;\">9.MqttClientController<\/span><\/h3>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n25\" mdtype=\"fences\" style=\" box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: pre-wrap;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;  \">package com.rfos.assistsilkworm.mqtt.client;\n\nimport com.rfos.assistsilkworm.common.CommonResult;\nimport com.rfos.assistsilkworm.mqtt.config.MqttConfig;\nimport com.rfos.assistsilkworm.mqtt.gateway.MqttPublishGateway;\nimport org.eclipse.paho.client.mqttv3.IMqttClient;\nimport org.eclipse.paho.client.mqttv3.MqttClient;\nimport org.eclipse.paho.client.mqttv3.MqttException;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.beans.factory.annotation.Qualifier;\nimport org.springframework.integration.annotation.ServiceActivator;\nimport org.springframework.integration.core.MessageProducer;\nimport org.springframework.integration.mqtt.core.MqttPahoClientFactory;\nimport org.springframework.integration.mqtt.inbound.MqttPahoMessageDrivenChannelAdapter;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.RestController;\n\n\/**\n * @Author rfos\n * @Date 2023\/2\/20 19:01\n * @Description TODO MQTT\u5ba2\u6237\u7aef\u5904\u7406\u53d1\u9001\u6570\u636e\n *\/\n@RestController\n@RequestMapping(\"\/mqtt\")\npublic class MqttClientController {\n    \/**\n     * \u53d1\u9001\u7f51\u5173\n     *\/\n    @Autowired\n    private MqttPublishGateway mqttPublishGateway;\n\n    @Autowired\n    @Qualifier(\"inbound\")\n    private MqttPahoMessageDrivenChannelAdapter messageProducer;\n\n\n\n    \/**\n     * \u6d4b\u8bd5\uff1a\u53d1\u5e03\u6d88\u606f\n     *\/\n    @GetMapping(\"\/testPublish\")\n    public CommonResult sentTest(@RequestParam(\"topic\") String topic,\n                                 @RequestParam(\"payload\") String payload){\n        mqttPublishGateway.sendToMqtt(topic,1,payload);\n        return CommonResult.success();\n    }\n\n    \/**\n     * \u6d4b\u8bd5\u8ba2\u9605\u4fe1\u606f\n     *\/\n    @GetMapping(\"\/testSubscribe\")\n    @ServiceActivator(inputChannel = \"MQTT_INPUT_CHANNEL\")\n    public CommonResult testSubscribe() throws MqttException {\n        messageProducer.addTopic(\"TOPICS\");\n        return CommonResult.success();\n    }\n\n\n\n\n}\n<\/pre>\n<p cid=\"n26\" mdtype=\"paragraph\" style=\" box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap; font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start; \">\n<p cid=\"n27\" mdtype=\"paragraph\" style=\" box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap; font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start; \"><span md-inline=\"image\" src=\"rfos-SpringBoot%E9%80%9A%E8%BF%87%E5%B7%A5%E5%8E%82%E6%A8%A1%E5%BC%8F%E5%AE%9E%E7%8E%B0MQTT-%E8%AE%A2%E9%98%85%E4%B8%8E%E6%B6%88%E8%B4%B9.assets\/image-20230221145731996.png\" style=\" box-sizing: border-box;min-width: 10px;min-height: 10px; word-break: break-all;font-family: monospace;vertical-align: top;display: inline-block;width: 964px; \"><\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-ratio=\"0.7503184713375797\" data-s=\"300,640\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"785\" style=\"\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.7503184713375797\" data-s=\"300,640\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png\" data-type=\"png\" data-w=\"785\" style=\"\"><\/noscript><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-ratio=\"0.17511520737327188\" data-s=\"300,640\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609e6e6f721d.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\" data-type=\"png\" data-w=\"1953\" style=\"\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.17511520737327188\" data-s=\"300,640\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609e6e6f721d.png\" data-type=\"png\" data-w=\"1953\" style=\"\"><\/noscript><\/p>\n<p style=\"display: none;\">\n <mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4f5c\u8005\uff1a\u539f\u521b rfos \u5c0f\u7f16\u9a91\u9c7c\u4e4b\u5b66\u70b9\u77e5\u8bc6 \u5c0f\u7f16\u9a91\u9c7c\u4e4b\u5b66\u70b9\u77e5\u8bc6 \u5fae\u4fe1\u53f7 rfospublic \u529f\u80fd\u4ecb\u7ecd \u77e5\u8bc6\u662f\u751f\u6d3b\u7684\u660e\u706f,\u66f4\u662f\u4e00\u79cd\u5feb\u4e50\u3002\u597d\u5947\u5219\u662f\u77e5\u8bc6\u7684\u840c\u82bd\uff0c\u800c\u8fd9\u91cc\u6b63\u662f\u4f60\u4eec\u7684\u597d\u5947\u4e4b\u5904\uff0c\u4e5f\u662f\u4f60\u4eec\u7684\u83b7\u89e3\u4e4b\u5730\u3002\u9676\u884c\u77e5\u8bf4\u8fc7:\u201c\u667a\u6167\u662f\u751f\u6210\u7684\uff0c\u77e5\u8bc6\u662f\u5b66\u6765\u7684\u3002\u5f88\u5e78\u8fd0\uff0c\u80fd\u628a\u6240\u5b66\uff0c\u6240\u609f\uff0c\u6240\u77e5\uff0c\u6240\u5f97\u7684\u4e1c\u897f\u5206\u4eab\u7ed9\u5927\u5bb6\u3002\u5e0c\u671b\u5927\u5bb6\u5173\u6ce8\uff0c\u8c22\u8c22 ! \u53d1\u8868\u4e8e<br \/>\n\u8f6c\u8f7d\u5730\u5740\uff1ahttps:\/\/mp.weixin.qq.com\/s\/Fwhle56yhHES9x3bcHBUuQ<\/p>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>1.pom.xml &lt;!&#8211; &nbsp; &nbsp; &nbsp; \u8fde\u63a5MQTT&#8211;&gt; &nbsp; &nbsp; &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-2983","post","type-post","status-publish","format-standard","hentry","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609323229873.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609e6e6f721d.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/default\/nine\/2023-07-14\/17-56-09\/20230714175609e6e6f721d.png","id":"image3"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2023-07-14","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":525,"next_post_id":2985,"next_post_title":"\u9762\u8bd5\u5b98\u95ee\uff1aSpringBoot\u4e2d\u6761\u4ef6\u6ce8\u89e3\u5e95\u5c42\u5982\u4f55\u5b9e\u73b0\u7684\uff1f","previous_post_id":2971,"previous_post_title":"6 \u79cd\u65b9\u5f0f\u8bfb\u53d6 Springboot \u7684\u914d\u7f6e\uff08\u539f\u7406+\u5b9e\u6218\uff09","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2983"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/2983\/revisions"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}