我的mqtt协议和emqttd开源项目个人理解(2) - 订阅$SYS主题,捕获客户端上下线消息

简介: 我的mqtt协议和emqttd开源项目个人理解(2) - 订阅$SYS主题,捕获客户端上下线消息

image.pngimage.png

1、acl.config文件定义了可订阅$SYS主题的权限。

{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
%%%{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
{allow, all}.

2、打开文件vm.args,把节点名称修改为:

#-name emqttd@127.0.0.1
-name emqttd@172.16.6.161

acl.config文件第三行默认是禁止客户端订阅$SYS/#主题。我们把它注释掉。开启一个客户端,订阅$SYS/#主题,消息如下:


源码参见-module(emqttd_broker)这个模块,它会每秒钟publish消息,主题关键字有uptime和datetime等。


源码参见-module(emqttd_stats)这个模块,它会每60秒钟publish消息,把Ets表mqtt_stats的信息发出来。


源码参见-module(emqttd_metrics)这个模块,它的原理同上。

connected to 172.16.6.161:1883
subscribed $SYS/#
message recevied from $SYS/brokers: qos=0
emqttd@172.16.6.161
message recevied from $SYS/brokers/emqttd@172.16.6.161/sysdescr: qos=0
Erlang MQTT Broker
message recevied from $SYS/brokers/emqttd@172.16.6.161/version: qos=0
1.1.3
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
29 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:01
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
30 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:02
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
31 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:03
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
32 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:04
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
33 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:05
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
34 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:06
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
35 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:07
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
36 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:08
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
37 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:09
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
38 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:10
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
39 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:11
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
40 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:12
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
41 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:13
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
42 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:14
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
43 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:15
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
44 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:16
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
45 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:17
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
46 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:18
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
47 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:19
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
48 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:20
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
49 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:21
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
50 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:22
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
51 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:23
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
52 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:24
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
53 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:25
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
54 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:26
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
55 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:27
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
56 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:28
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
57 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:29
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
58 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:30
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
59 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:31
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/count: qos=0
53
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/max: qos=0
53
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/count: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/count: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/max: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/max: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/received: qos=0
69
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/sent: qos=0
2
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingresp: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 0 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:32
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/disconnect: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/sent: qos=0
4249
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/retained: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/dropped: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/received: qos=0
2
message recevied from $SYS/brokers: qos=0
emqttd@172.16.6.161
message recevied from $SYS/brokers/emqttd@172.16.6.161/version: qos=0
1.1.3
message recevied from $SYS/brokers/emqttd@172.16.6.161/sysdescr: qos=0
Erlang MQTT Broker
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingreq: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/subscribe: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/suback: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connect: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connack: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsubscribe: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsuback: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 1 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:33
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 2 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:34
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 3 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:35
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 4 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:36
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 5 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:37
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 6 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:38
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 7 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:39
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 8 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:40
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 9 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:41
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 10 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:42
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 11 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:43
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 12 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:44
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 13 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:45
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 14 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:46
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 15 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:47
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 16 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:48
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 17 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:49
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 18 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:50
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 19 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:51
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 20 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:52
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 21 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:53
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 22 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:54
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 23 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:55
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 24 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:56
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 25 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:57
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 26 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:58
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 27 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:24:59
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 28 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:00
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 29 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:01
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 30 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:02
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 31 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:03
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 32 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:04
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 33 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:05
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 34 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:06
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 35 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:07
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 36 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:08
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 37 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:09
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 38 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:10
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 39 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:11
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 40 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:12
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 41 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:13
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 42 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:14
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 43 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:15
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 44 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:16
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 45 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:17
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 46 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:18
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 47 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:19
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 48 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:20
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 49 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:21
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 50 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:22
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 51 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:23
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 52 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:24
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 53 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:25
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 54 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:26
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 55 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:27
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 56 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:28
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 57 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:29
message recevied from $SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/connected: qos=0
{"clientid":"861694030142478","username":"invtGTerm","ipaddress":"172.16.6.155","session":false,"protocol":3,"connack":0,"ts":1512617129}
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 58 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:30
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
1 minutes, 59 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:31
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/count: qos=0
53
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/count: qos=0
2
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/max: qos=0
53
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/count: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/count: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/max: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/max: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/max: qos=0
2
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/received: qos=0
125
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/sent: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingresp: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 0 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:32
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/disconnect: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/sent: qos=0
15200
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/retained: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/dropped: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/received: qos=0
3
message recevied from $SYS/brokers: qos=0
emqttd@172.16.6.161
message recevied from $SYS/brokers/emqttd@172.16.6.161/version: qos=0
1.1.3
message recevied from $SYS/brokers/emqttd@172.16.6.161/sysdescr: qos=0
Erlang MQTT Broker
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingreq: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/subscribe: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/suback: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connect: qos=0
2
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connack: qos=0
2
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsubscribe: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsuback: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 1 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:33
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 2 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:34
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 3 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:35
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 4 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:36
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 5 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:37
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 6 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:38
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 7 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:39
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 8 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:40
message recevied from $SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/disconnected: qos=0
{"clientid":"861694030142478","reason":"normal","ts":1512617141}
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 9 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:41
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 10 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:42
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 11 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:43
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 12 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:44
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 13 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:45
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 14 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:46
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 15 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:47
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 16 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:48
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 17 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:49
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 18 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:50
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 19 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:51
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 20 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:52
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 21 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:53
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 22 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:54
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 23 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:55
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 24 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:56
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 25 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:57
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 26 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:58
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 27 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:25:59
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 28 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:00
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 29 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:01
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 30 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:02
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 31 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:03
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 32 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:04
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 33 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:05
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 34 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:06
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 35 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:07
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 36 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:08
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 37 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:09
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 38 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:10
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 39 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:11
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 40 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:12
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 41 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:13
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 42 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:14
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 43 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:15
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 44 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:16
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 45 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:17
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 46 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:18
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 47 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:19
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 48 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:20
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 49 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:21
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 50 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:22
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 51 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:23
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 52 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:24
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 53 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:25
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 54 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:26
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 55 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:27
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 56 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:28
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 57 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:29
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 58 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:30
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
2 minutes, 59 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:31
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/count: qos=0
53
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/max: qos=0
53
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/count: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/count: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/max: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/max: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/max: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/max: qos=0
2
message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/count: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/received: qos=0
127
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/sent: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingresp: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 0 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:32
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/disconnect: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/sent: qos=0
26419
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/retained: qos=0
3
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/dropped: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/received: qos=0
4
message recevied from $SYS/brokers: qos=0
emqttd@172.16.6.161
message recevied from $SYS/brokers/emqttd@172.16.6.161/version: qos=0
1.1.3
message recevied from $SYS/brokers/emqttd@172.16.6.161/sysdescr: qos=0
Erlang MQTT Broker
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingreq: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/subscribe: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/suback: qos=0
1
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connect: qos=0
2
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connack: qos=0
2
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsubscribe: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/sent: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsuback: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/received: qos=0
0
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 1 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:33
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 2 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:34
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 3 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:35
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 4 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:36
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 5 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:37
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 6 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:38
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 7 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:39
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 8 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:40
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 9 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:41
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 10 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:42
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 11 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:43
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 12 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:44
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 13 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:45
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 14 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:46
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 15 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:47
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 16 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:48
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 17 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:49
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 18 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:50
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 19 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:51
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 20 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:52
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 21 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:53
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 22 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:54
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 23 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:55
message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0
3 minutes, 24 seconds
message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0
2017-12-07 11:26:56
unsubscribed $SYS/#

3、订阅客户端上下线的主题,源码参见-module(emqttd_mod_presence).


源码提及的具体某个节点的某个clientId方式的主题是:


$SYS/brokers/ (node)/clients/ (clientId)/connected

$SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/connected

$SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/disconnected

本人整理之后,通配方式的主题是:

$SYS/brokers/+/clients/+/connected

$SYS/brokers/+/clients/+/disconnected

$SYS/brokers/+/clients/#

实测订阅客户端上下线消息如下:

connected to 172.16.6.161:1883
subscribed $SYS/brokers/+/clients/#
message recevied from $SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/connected: qos=0
{"clientid":"861694030142478","username":"invtGTerm","ipaddress":"172.16.6.155","session":false,"protocol":3,"connack":0,"ts":1512629239}
message recevied from $SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/disconnected: qos=0
{"clientid":"861694030142478","reason":"normal","ts":1512629242}

所以,出于安全起见,我们把acl.config文件修改为:

允许客户端订阅"$SYS/brokers/+/clients/#"主题,但是禁止订阅"$SYS/#"主题。

{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
{allow, all, subscribe, ["$SYS/brokers/+/clients/#"]}.
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
{allow, all}.


相关实践学习
消息队列RocketMQ版:基础消息收发功能体验
本实验场景介绍消息队列RocketMQ版的基础消息收发功能,涵盖实例创建、Topic、Group资源创建以及消息收发体验等基础功能模块。
消息队列 MNS 入门课程
1、消息队列MNS简介 本节课介绍消息队列的MNS的基础概念 2、消息队列MNS特性 本节课介绍消息队列的MNS的主要特性 3、MNS的最佳实践及场景应用 本节课介绍消息队列的MNS的最佳实践及场景应用案例 4、手把手系列:消息队列MNS实操讲 本节课介绍消息队列的MNS的实际操作演示 5、动手实验:基于MNS,0基础轻松构建 Web Client 本节课带您一起基于MNS,0基础轻松构建 Web Client
相关文章
|
16天前
|
网络协议 物联网 网络性能优化
物联网协议比较 MQTT CoAP RESTful/HTTP XMPP
【10月更文挑战第18天】本文介绍了物联网领域中四种主要的通信协议:MQTT、CoAP、RESTful/HTTP和XMPP,分别从其特点、应用场景及优缺点进行了详细对比,并提供了简单的示例代码。适合开发者根据具体需求选择合适的协议。
41 5
|
2月前
|
消息中间件 监控 物联网
MQTT协议对接及RabbitMQ的使用记录
通过合理对接MQTT协议并利用RabbitMQ的强大功能,可以构建一个高效、可靠的消息通信系统。无论是物联网设备间的通信还是微服务架构下的服务间消息传递,MQTT和RabbitMQ的组合都提供了一个强有力的解决方案。在实际应用中,应根据具体需求和环境进行适当的配置和优化,以发挥出这两个技术的最大效能。
157 0
|
3月前
|
物联网 C# 智能硬件
智能家居新篇章:WPF与物联网的智慧碰撞——通过MQTT协议连接与控制智能设备,打造现代科技生活的完美体验
【8月更文挑战第31天】物联网(IoT)技术的发展使智能家居设备成为现代家庭的一部分。通过物联网,家用电器和传感器可以互联互通,实现远程控制和状态监测等功能。本文将探讨如何在Windows Presentation Foundation(WPF)应用中集成物联网技术,通过具体示例代码展示其实现过程。文章首先介绍了MQTT协议及其在智能家居中的应用,并详细描述了使用Wi-Fi连接方式的原因。随后,通过安装Paho MQTT客户端库并创建MQTT客户端实例,演示了如何编写一个简单的WPF应用程序来控制智能灯泡。
103 0
|
3月前
|
物联网 网络性能优化 Python
"掌握MQTT协议,开启物联网通信新篇章——揭秘轻量级消息传输背后的力量!"
【8月更文挑战第21天】MQTT是一种轻量级的消息传输协议,以其低功耗、低带宽的特点在物联网和移动应用领域广泛应用。基于发布/订阅模型,MQTT支持三种服务质量级别,非常适合受限网络环境。本文详细阐述了MQTT的工作原理及特点,并提供了使用Python `paho-mqtt`库实现的发布与订阅示例代码,帮助读者快速掌握MQTT的应用技巧。
79 0
|
4月前
|
消息中间件 搜索推荐 RocketMQ
消息队列 MQ使用问题之如何将一个主题的多个分区分布到不同的Broker上
消息队列(MQ)是一种用于异步通信和解耦的应用程序间消息传递的服务,广泛应用于分布式系统中。针对不同的MQ产品,如阿里云的RocketMQ、RabbitMQ等,它们在实现上述场景时可能会有不同的特性和优势,比如RocketMQ强调高吞吐量、低延迟和高可用性,适合大规模分布式系统;而RabbitMQ则以其灵活的路由规则和丰富的协议支持受到青睐。下面是一些常见的消息队列MQ产品的使用场景合集,这些场景涵盖了多种行业和业务需求。
|
5月前
|
数据采集 监控 物联网
MQTT协议在智能制造中的应用案例与效益分析
【6月更文挑战第8天】MQTT协议在智能制造中的应用案例与效益分析
145 1
|
9天前
|
消息中间件 存储 Kafka
MQ 消息队列核心原理,12 条最全面总结!
本文总结了消息队列的12个核心原理,涵盖消息顺序性、ACK机制、持久化及高可用性等内容。关注【mikechen的互联网架构】,10年+BAT架构经验倾囊相授。
|
14天前
|
消息中间件 JSON Java
开发者如何使用轻量消息队列MNS
【10月更文挑战第19天】开发者如何使用轻量消息队列MNS
46 4
|
13天前
|
消息中间件
解决方案 | 云消息队列RabbitMQ实践获奖名单公布!
云消息队列RabbitMQ实践获奖名单公布!
|
23天前
|
消息中间件 安全 Java
云消息队列RabbitMQ实践解决方案评测
一文带你详细了解云消息队列RabbitMQ实践的解决方案优与劣
58 4