|
@@ -37,8 +37,6 @@ public class RocketMqConsumerListener {
|
|
|
properties.put(PropertyKeyConst.SuspendTimeMillis, "100");
|
|
|
// 消息消费失败时的最大重试次数
|
|
|
properties.put(PropertyKeyConst.MaxReconsumeTimes, "10");
|
|
|
- // 消费组名称
|
|
|
- properties.put(PropertyKeyConst.GROUP_ID, PropertyHolder.getString("examcloud.rocketmq.consumer_group"));
|
|
|
}
|
|
|
|
|
|
public static void start() {
|
|
@@ -49,6 +47,7 @@ public class RocketMqConsumerListener {
|
|
|
}
|
|
|
|
|
|
private static void onlineExamStudent() {
|
|
|
+ properties.put(PropertyKeyConst.GROUP_ID, Tag.ONLINE_EXAM_STUDENT.getGroup() + ReportsUtil.getProfile());
|
|
|
Consumer consumer = ONSFactory.createConsumer(properties);
|
|
|
consumer.subscribe(ReportsUtil.getReportTopic(), Tag.ONLINE_EXAM_STUDENT.getCode(), new MessageListener() {
|
|
|
|
|
@@ -69,6 +68,7 @@ public class RocketMqConsumerListener {
|
|
|
}
|
|
|
|
|
|
private static void onlineStudent() {
|
|
|
+ properties.put(PropertyKeyConst.GROUP_ID, Tag.ONLINE_STUDENT.getGroup() + ReportsUtil.getProfile());
|
|
|
Consumer consumer = ONSFactory.createConsumer(properties);
|
|
|
consumer.subscribe(ReportsUtil.getReportTopic(), Tag.ONLINE_STUDENT.getCode(), new MessageListener() {
|
|
|
|
|
@@ -89,6 +89,7 @@ public class RocketMqConsumerListener {
|
|
|
}
|
|
|
|
|
|
private static void onlineUser() {
|
|
|
+ properties.put(PropertyKeyConst.GROUP_ID, Tag.ONLINE_USER.getGroup() + ReportsUtil.getProfile());
|
|
|
Consumer consumer = ONSFactory.createConsumer(properties);
|
|
|
consumer.subscribe(ReportsUtil.getReportTopic(), Tag.ONLINE_USER.getCode(), new MessageListener() {
|
|
|
|
|
@@ -109,6 +110,7 @@ public class RocketMqConsumerListener {
|
|
|
}
|
|
|
|
|
|
private static void operateInfo() {
|
|
|
+ properties.put(PropertyKeyConst.GROUP_ID, Tag.OPERATE_INFO.getGroup() + ReportsUtil.getProfile());
|
|
|
Consumer consumer = ONSFactory.createConsumer(properties);
|
|
|
consumer.subscribe(ReportsUtil.getReportTopic(), Tag.OPERATE_INFO.getCode(), new MessageListener() {
|
|
|
|