Compared with V2.x.x, Message Queue for MQTT of version V3.x.x implements independent data storage without strong dependency on Message Queue for Apache RocketMQ. Therefore, the message publish-subscribe process has changed accordingly.
Message Queue for MQTT V2.x.x is strongly dependent on Message Queue for Apache RocketMQ for message storage. Therefore, Message Queue for MQTT messages are interconnected with those of Message Queue for Apache RocketMQ. After you create a topic, you can use the SDKs of Message Queue for Apache RocketMQ and Message Queue for MQTT for intercommunication.
After Message Queue for MQTT of version V3.x.x adopts independent internal storage, it uses Message Queue for MQTT separately for publishing and subscribing to messages, without needing to configure any other services. However, if you still need data exchanges between Message Queue for MQTT and Message Queue for Apache RocketMQ, you must configure additional data forwarding rules. The following table describes the differences in specific scenarios.
Scenario | V2.x.x usage instructions | V3.x.x usage instructions |
---|---|---|
The Message Queue for MQTT client publishes and subscribes to messages. | The Message Queue for Apache RocketMQ console or API is used to create topics before messages can be published and subscribed to. | The Message Queue for MQTT console is used to create topics before messages can be published and subscribed to. |
The Message Queue for MQTT client publishes messages, and the Message Queue for Apache RocketMQ client subscribes to messages. |
|
|
The Message Queue for Apache RocketMQ client publishes messages, and the Message Queue for MQTT client subscribes to messages. |
|
|
After the Message Queue for MQTT client goes online or offline, the Message Queue for Apache RocketMQ client consumes and processes the online or offline notifications. |
|
|