沙钢智慧能源系统后端代码
Jay
2025-01-18 fe78dfa6ed9f7b884914005b70f3b21e5ced0cf4
修改mq注册队列
已删除1个文件
已修改2个文件
52 ■■■■ 文件已修改
shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueueElecPredictFinishConfig.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueuePredictFinishConfig.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/consumer/ModelElecPredictFinishConsumer.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);