Gateways / Nginx modules

CoAP gateway

Configure bounded CoAP POST ingress through a registered trusted-gateway boundary.

Source runtime certified; installed replay pending

The CoAP stream gateway parses bounded UDP requests, maps Uri-Path to broker topics, preserves content-format metadata, and admits commands through a registered gateway identity.

Server configuration

stream {
  server {
    listen 5683 udp;
    iot_gateway_coap on;
    iot_gateway_coap_max_payload 512;
    iot_gateway_coap_confirmable_ack on;
    iot_gateway_coap_blockwise on;
    iot_gateway_coap_observe on;
    iot_gateway_coap_security trusted_gateway;
    iot_gateway_coap_identity tenant-a gateway-a;
    iot_gateway_coap_iotd on;
    iot_gateway_coap_iotd_ring /nginz-iot-edge 4096 1024 1 1;
  }
}

iot_gateway_coap_security accepts the selected trusted_gateway or externally dtls_terminated boundary. Block1 reassembly is bounded to the 512-byte inline ceiling. Direct nginx-owned DTLS, arbitrary public UDP exposure, daemon-to-device Observe delivery, and Block2 are not claimed.

Workers keep bounded response and incomplete Block1 caches. nginz-iotd owns completed-exchange idempotency for the 247-second CoAP lifetime and inbound Observe serial ordering, so an old/new nginx reload cannot repeat a broker mutation or accept a stale observation. An incomplete Block1 transfer may need to restart after reload.

Response meaning

A correlated 2.04 Changed response confirms accepted ring admission for the selected confirmable POST path. It does not expand the store acknowledgement promise of the chosen lane. The selected CoAP ingress profile is a Max and Enterprise gateway.

Implementation authority

This page is a customer-oriented guide. The source contract remains authoritative for exact behavior and release evidence.

src/modules/gateway-coap-nginx-module/README.md