Skip to main content
Version: 4.x

RocketMQ MQTT QuickStart

System Requirements

  • 64-bit operating system, Linux/Unix/macOS recommended
  • 64-bit JDK 1.8+

Deployment Instructions

Since the RocketMQ-MQTT project relies on the underlying multi-queue distribution of RocketMQ, RocketMQ supports this feature from version 4.9.3, so you need to confirm that the version of RocketMQ is upgraded to 4.9.3 or later, and ensure that the following configuration items are enabled:

enableLmq = true 
enableMultiDispatch = true

For the deployment of RocketMQ-MQTT, refer to the project description, download the project release version or build it directly from the source code.

git clone
cd rocketmq-mqtt
mvn -Prelease-all -DskipTests clean install -U
cd distribution/target/
cd bin
sh start

Configuration instructions

username=xxx    // Authorization verification account configuration
secretKey=xxx // Authorization verification account configuration
NAMESRV_ADDR=xxx //namesrv access point
eventNotifyRetryTopic=xx //notify retry topic, created in advance
clientRetryTopic=xx //Client message retry topic, created in advance

Other launch configuration reference projects

Example Description

The basic code is provided in the project engineering code, see the code example  // MQTT client initiates subscription message // MQTT client starts publishing messages // RocketMQ client starts subscription message // RocketMQ client starts publishing messages