Table of contents
1. Dependence
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId>
<version>2.0.3</version>
</dependency>
2. Scene
1. Producers and consumers belong to the same program
2. The producer opens the message track
DefaultMQProducer producer = new DefaultMQProducer(groupName, new AclClientRPCHook(new SessionCredentials("xxx", "xxx")), true, null);
3. Consumers open the message track
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("", config.getGroupName(), new AclClientRPCHook(new SessionCredentials("xxx", "xxx")), new AllocateMessageQueueAveragely(), true, null);
4. After the producer and consumer are turned on together, the message consumption track cannot be viewed on the RocketMQ visual interface.
Note: If only the message trace of one of the producer or consumer is enabled, the message consumption trace is normal.
3. Performance
Unable to display consumption track
4. Reasons
The specific reason is not clear. The problem can be solved by changing the RocketMQ dependent version.
5. Solve
Change RocketMQ dependency version, replace 2.0.3 with 2.2.3
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId>
<version>2.2.3</version>
</dependency>
After the replacement, the message trace is displayed normally.