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 or API 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.
  1. The Message Queue for Apache RocketMQ console or the Message Queue for MQTT console is used to create topics.
  2. Messages are published and subscribed to.
  1. The Message Queue for MQTT console is used to create topics.
  2. The Message Queue for Apache RocketMQ console is used to create mapped topics, which can be different from the topics of Message Queue for MQTT.
  3. The Message Queue for MQTT console is used to create data outbound rules to configure mappings. For more information about the procedure, see Manage data outbound rules.
  4. Messages are published and subscribed to.
The Message Queue for Apache RocketMQ client publishes messages, and the Message Queue for MQTT client subscribes to messages.
  1. The Message Queue for Apache RocketMQ console or the Message Queue for MQTT console is used to create topics.
  2. Messages are published and subscribed to.
  1. The Message Queue for MQTT console is used to create topics.
  2. The Message Queue for Apache RocketMQ console is used to create mapped topics, which can be different from the topics of Message Queue for MQTT.
  3. The Message Queue for MQTT console is used to create data inbound rules to configure mappings. For more information about the procedure, see Manage data inbound rules.
  4. Messages are published and subscribed to.
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.
  1. Dedicated topics for online or offline notification purposes are created in the Message Queue for MQTT console.
  2. The Message Queue for MQTT client goes online or offline.
  3. The Message Queue for Apache RocketMQ client is used to subscribe to online or offline notification topics.
  1. Topics for storing notification events are created in the Message Queue for Apache RocketMQ console, without any formatting requirements.
  2. Client status notification rules are created in the Message Queue for MQTT console to configure mappings. For more information about the procedure, see Manage client status notification rules.
  3. The Message Queue for MQTT client goes online or offline.
  4. The Message Queue for Apache RocketMQ client is used to subscribe to online or offline notification topics.