Mqtt server
1. Using MQTT
Version 2.0 newly builds an MQTT broker based on Netty, and also optimizes the way EMQ is used.
Differences between the old version using EMQ and the new version:
2. Topic Management
Topics are managed centrally in this class, marked as publish topic / subscribe topic.
Simplification of the EMQ client's topic subscription code: subscribe to all subscription properties of the TopicType class.
Message callback method update:
Received messages are cached by topic into separate Channels in the gateway module for message processing as needed, reducing message peaks for the callback client and improving data processing and forwarding capability and efficiency.
3. MQTT Built on Netty
The cluster is built based on Redis; a more efficient clustering solution will be adopted later.
The startup class is shown below:
4. Switching Between EMQ and netty-mqtt
Whether you use EMQ or netty-mqtt, message data is processed the same way. You can choose one of the two, but using both at the same time is not supported.
The configuration that controls which MQTT is used:

