shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueueElecPredictFinishConfig.java
文件已删除 shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueuePredictFinishConfig.java
@@ -18,9 +18,16 @@ // 队列名称 public final static String QUEUE_NAME = "IaiabFastShateel.Model.PredictFinish"; public final static String QUEUE_NAME_Elec = "IaiabFastShateel.Model.PredictFinish.Elec"; @Bean public Queue predictFinishQueue() { return new Queue(QueuePredictFinishConfig.QUEUE_NAME); } @Bean public Queue predictFinishQueueElec() { return new Queue(QueuePredictFinishConfig.QUEUE_NAME_Elec); } @Bean @@ -33,4 +40,9 @@ Binding bindingExchangeMessagePF() { return BindingBuilder.bind(predictFinishQueue()).to(predictFinishExchange()).with(RoutingConstant.Iailab_Model_PredictFinish); } @Bean Binding bindingExchangeMessageElec() { return BindingBuilder.bind(predictFinishQueueElec()).to(predictFinishExchange()).with(RoutingConstant.Iailab_Model_PredictFinish_Elec); } } shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelElecPredictFinishConsumer.java
@@ -6,7 +6,7 @@ import com.iailab.module.model.api.mdk.dto.MdkScheduleReqDTO; import com.iailab.module.model.enums.ScheduleTriggerMethodEnum; import com.iailab.module.shasteel.mq.common.constant.CommonConstant; import com.iailab.module.shasteel.mq.config.QueueElecPredictFinishConfig; import com.iailab.module.shasteel.mq.config.QueuePredictFinishConfig; import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.core.Message; import org.springframework.amqp.rabbit.annotation.RabbitListener; @@ -37,7 +37,7 @@ * * @param message */ @RabbitListener(queues = QueueElecPredictFinishConfig.QUEUE_NAME) @RabbitListener(queues = QueuePredictFinishConfig.QUEUE_NAME) public void listen(Message message) { String messageBody = new String(message.getBody()); log.info("开始执行电力调度,messageBody:" + messageBody);