MQTT-SN gateway
Configure constrained-device MQTT-SN ingress and tenant-scoped Topic ID state.
Phase 14 two-image protocol and packaged matrixThe MQTT-SN stream gateway maps selected UDP protocol records into the common broker command ABI. It maintains a bounded, tenant-scoped Topic ID lifecycle and supports the selected MQTT-SN 1.2 profile.
Configuration surface
stream {
server {
listen 1884 udp;
iot_gateway_mqttsn on;
iot_gateway_mqttsn_gateway_id 1;
iot_gateway_mqttsn_identity tenant-a gateway-a NGINZ_IOT_MQTTSN_PASSWORD;
iot_gateway_mqttsn_max_payload 512;
iot_gateway_mqttsn_topic_registry 16;
iot_gateway_mqttsn_advertise 30s;
iot_gateway_mqttsn_advertise_to 239.255.0.1:1884;
iot_gateway_mqttsn_sleep_max 3600;
iot_gateway_mqttsn_iotd on;
iot_gateway_mqttsn_iotd_rings /nginz-iot-edge 4096 1024 1024 1 1;
}
}
Selected behavior
The current boundary covers CONNECT, REGISTER, PUBLISH, SUBSCRIBE, UNSUBSCRIBE, PUBACK, PINGREQ, and DISCONNECT command shaping. A bounded 32-entry, 60-second table correlates asynchronous PUBACK, SUBACK, and UNSUBACK responses by kind and message ID, including out-of-order delivery. Capacity, payload, sleep, and ring limits are mandatory operational controls.
When advertisements are enabled, advertise_to must be an explicit IPv4 broadcast or multicast destination. Worker slot 0 owns a process-local nginx timer and UDP socket; workers share no advertiser state, and a graceful reload may briefly duplicate an idempotent ADVERTISE packet.
The selected MQTT-SN 1.2 profile passed its complete 17-scenario matrix on both installed image variants against pinned Paho peers. Advertise, sleeping-client, and QoS 2 MQTT-SN behaviors outside that profile remain excluded.
This page is a customer-oriented guide. The source contract remains authoritative for exact behavior and release evidence.
src/modules/gateway-mqttsn-nginx-module/README.md