There are four fundamental components in an MQTT-SN topology:
- Gateways: In MQTT-SN, a gateway has the responsibility of protocol conversion from MQTT-SN to MQTT and vice versa (although other translations are possible). Gateways can also be aggregating or transparent (covered later in this chapter).
- Forwarders: A route between a sensor and an MQTT-SN gateway may take many paths and hop across several routers along the way. Nodes between the source client and the MQTT-SN gateway are called forwarders and simply re-encapsulate MQTT-SN frames into new and unchanged MQTT-SN frames that are sent to the destination until they arrive at the correct MQTT-SN gateway for protocol conversion.
- Clients: Clients behave in the same way as in MQTT and are capable of subscribing and publishing data.
- Brokers: Brokers behave in the same way as in MQTT:
MQTT-SN topology. Wireless sensors communicate either to MQTT-SN gateways, which translate MQTT-SN to MQTT, to other protocol forms, or to forwarders that simply encapsulate MQTT-SN frames received into MQTT-SN messages forwarded to a gateway.