Home > Back-end >  Rocketmq - springboot can achieve the same topic, use multiple environment isolation?
Rocketmq - springboot can achieve the same topic, use multiple environment isolation?

Time:10-13

Meet a problem now, we only had a rocketmq server, the development environment and test environment to send information to the topic, will be randomly consumption, how to implement separate?
The current code:
 & lt; ! - rocketMQ - & gt; 

Org. Apache. Rocketmq
Rocketmq - spring - boot
2.0.2 & lt;/version>
Compile


@ Component
@ RocketMQMessageListener (consumerGroup="test_consumer_group", topic.=MQConstant TOPIC_TEST)
Public class TopicTestListener implements RocketMQListener {

@ Override
Public void onMessage (Object Object) {
System. Out.println (MQConstant TOPIC_TEST + ", the onMessage... ");
System. The out. Println (object. The toString ());
}

Public String getName () {
return "";
}
}

  • Related