Online and Offline notification
The online and offline notification module is started by default and can be started and stopped through the dashboard page.
Open , click the “Modules” tab on the left:
There is no need to configure any parameters for the online and offline notification. After you click Add directly, the module is added.
Online and offline message notification format
| Topic | Description | | ———————————— | ———————————— ———————— | | ${clientid}/connected | Online event. When any client goes online, EMQX will publish a message on that topic | | ${clientid}/disconnected | Offline event. When any client goes offline, EMQX will publish a message on that topic |
The Payload of the connected
event message is parsed into JSON format as follows:
The Payload of the disconnected
event message is parsed into JSON format as follows:
{
"ts": 1625572213873,
"sockport": 1883,
"reason": "tcp_closed",
"ipaddress": "127.0.0.1",
"disconnected_at": 1625572213873,
}