Skip to content

Commit

Permalink
📝 梳理文档
Browse files Browse the repository at this point in the history
  • Loading branch information
li-xunhuan committed Feb 20, 2024
1 parent fcb00a1 commit 97548a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public static void main(String[] args) {
.port(1883)
.username("admin")
.password("123456")
// 采用 globalSubscribe,保留 session 停机重启后,可以接受到离线消息,注意:clientId 要不能变化。
.clientId("globalTest")
.cleanSession(false)
// 全局订阅的 topic
.globalSubscribe("/test", "/test/123", "/debug/#")
// 全局监听,也会监听到服务端 http api 订阅的数据
Expand Down
3 changes: 3 additions & 0 deletions mica-mqtt-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ MqttClient.create()
.port(1883)
.username("admin")
.password("123456")
// 采用 globalSubscribe,保留 session 停机重启后,可以接受到离线消息,注意:clientId 要不能变化。
.clientId("globalTest")
.cleanSession(false)
// 全局订阅的 topic
.globalSubscribe("/test", "/test/123", "/debug/#")
// 全局监听,也会监听到服务端 http api 订阅的数据
Expand Down

0 comments on commit 97548a9

Please sign in to comment.