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:

    image-20200927213049265

    There is no need to configure any parameters for the online and offline notification. After you click Add directly, the module is added.

    image-20200927213049265

    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:

    1. {
    2. "ts": 1625572213873,
    3. "sockport": 1883,
    4. "reason": "tcp_closed",
    5. "ipaddress": "127.0.0.1",
    6. "disconnected_at": 1625572213873,
    7. }