HiveMQ Edge MQTT-SN Gateway

HiveMQ Edge incorporates an MQTT-SN (MQTT for Sensor Networks) gateway that allows constrained devices to access the MQTT broker.

MQTT-SN is an optimized version of the MQTT specification designed for the small, low powered sensor devices that often running on the edge of the network; typical of the IoT.

The HiveMQ Edge implementation of MQTT-SN uses the User Datagram Protocol (UDP) as a transport layer. To enable the optional MQTT-SN Gateway feature, you add transport listeners to your configuration as follows:

Example configuration to enable MQTT-SN Gateway
<?xml version="1.0"?>
<hivemq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <mqtt-sn-listeners>
        <udp-listener>
            <port>2442</port>
            <bind-address>0.0.0.0</bind-address>
        </udp-listener>
    </mqtt-sn-listeners>
</hivemq>
Example configuration to add predefined topics to an MQTT-SN Gateway
<?xml version="1.0"?>
<hivemq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <mqtt-sn>
        <predefined-topics>
            <predefined-topic>
                <topicName>foo</topicName>
                <alias>1</alias>
            </predefined-topic>
        </predefined-topics>
        <gateway-id>1</gateway-id>
    </mqtt-sn>
</hivemq>
Example configuration for sleeping client topic registration behavior
<?xml version="1.0"?>
<hivemq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <mqtt-sn>
        <topic-registrations-held-during-sleep>
            <enabled>true</enabled>
        </topic-registrations-held-during-sleep>
        <gateway-id>1</gateway-id>
    </mqtt-sn>
</hivemq>
Example configuration to allow anonymous QoS 1 publishing
<?xml version="1.0"?>
<hivemq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <mqtt-sn>
        <allow-anonymous-publish-minus-one>
            <enabled>true</enabled>
        </allow-anonymous-publish-minus-one>
        <gateway-id>1</gateway-id>
    </mqtt-sn>
</hivemq>

To learn more about MQTT-SN, see the official MQTT-SN Specification.