Server module
提示
Version 2.0 update: the MQTT, TCP, and UDP servers based on the Netty architecture have been integrated, with sessions and devices of the three servers managed uniformly.
1. Configuration File
Let's look at how to start and stop services in the configuration file. Each service is controlled by enabled, and MQTT and WebSocket are started and stopped together.
In the backend code, the server management modules are as follows:
- boot-strap manages the startup of each server
- iot-server-core builds the TCP service and UDP service, and is also the basic core module integrating all servers, containing sessions, basic decoding/encoding, basic configuration, and other information
- mqtt-broker the MQTT broker and WebSocket service built on Netty
2. Unified Configuration Class and Session Management
Integrated base configuration class: NettyConfig
Session management: ISessionStore
3. MQTT & WebSocket Service Startup Class
MQTTBootStrap
4. TCP Service Startup Class
TCPBootStrap
5. UDP Service Startup Class
UDPBootStrap
6. Locating Server Code for Secondary Development
| Requirement | Check First | Description |
|---|---|---|
| MQTT/TCP/UDP start/stop | Server configuration, BootStrap | Confirm the enabled flag and port configuration |
| Device session management | ISessionStore | Unified management of connection state and sessions |
| Protocol parsing | fastbee-protocol | It is not recommended to write protocol parsing in a Controller |
| Device authentication | /iot/tool/mqtt/auth and other APIs | Authentication logic must keep the product, device, and auth code consistent |
| Video signaling | sip-server, isup-server | Troubleshoot SIP/ISUP separately from the media playback chain |
| Recording service | fastbee-record | ZLM Hook, recording, playback |
For more module mappings, see Backend Module Mapping.

