Explorar o código

update mq topic

deason hai 1 mes
pai
achega
0116f53cfd

+ 2 - 2
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/report/ExamProcessRecordReport.java

@@ -62,7 +62,7 @@ public class ExamProcessRecordReport extends BaseReport {
         this.examRecordDataId = examRecordDataId;
         this.examProcess = examProcess;
         this.recordTime = recordTime;
-        this.topic = ReportsUtil.getReportTopic();
-        this.tag = Tag.EXAM_PROCESS_RECORD.getCode();
+        this.topic = ReportsUtil.curTopic(Tag.EXAM_PROCESS_RECORD);
+        this.tag = Tag.EXAM_PROCESS_RECORD.name();
     }
 }

+ 2 - 2
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/report/RocketMqConsumerListener.java

@@ -40,9 +40,9 @@ public class RocketMqConsumerListener {
     }
 
     private static void onlineExamStudent() {
-        properties.put(PropertyKeyConst.GROUP_ID, Tag.EXAM_PROCESS_RECORD.getGroup() + "_" + ReportsUtil.getProfile());
+        properties.put(PropertyKeyConst.GROUP_ID, ReportsUtil.curConsumerGroup(Tag.EXAM_PROCESS_RECORD));
         Consumer consumer = ONSFactory.createConsumer(properties);
-        consumer.subscribe(ReportsUtil.getReportTopic(), Tag.EXAM_PROCESS_RECORD.getCode(), new MessageListener() {
+        consumer.subscribe(ReportsUtil.curTopic(Tag.EXAM_PROCESS_RECORD), Tag.EXAM_PROCESS_RECORD.name(), new MessageListener() {
 
             @Override
             public Action consume(Message message, ConsumeContext context) {