Skip to content

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.
Topic management page screenshot

Simplification of the EMQ client's topic subscription code: subscribe to all subscription properties of the TopicType class.
Topic management page screenshot

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.
Topic management page screenshot

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:
MQTT built on Netty page screenshot

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:
Switching between EMQ and netty-mqtt page screenshot

FastBee | fastbee.cn