沙钢智慧能源系统后端代码
MQ
潘志宝
2024-12-11 250b37535c946ee1e04c67fcba8928f590618cd9
shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueuePredictFinishConfig.java
文件名从 shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/TopicPredictFinishRabbitConfig.java 修改
@@ -1,5 +1,6 @@
package com.iailab.module.shasteel.mq.config;
import com.iailab.module.shasteel.mq.common.RoutingConstant;
import com.iailab.module.shasteel.mq.consumer.PredictFinishMessage;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
@@ -14,13 +15,13 @@
 * @createTime 2024年11月27日
 */
@Configuration
public class TopicPredictFinishRabbitConfig {
    //绑定键
    public final static String routingPredictFinish = PredictFinishMessage.PREDICTFINISH_ROUTING_KEY;
public class QueuePredictFinishConfig {
    // 队列名称
    public final static String QUEUE_NAME = "IaiabFastShateel.Model.PredictFinish";
    @Bean
    public Queue predictFinishQueue() {
        return new Queue(TopicPredictFinishRabbitConfig.routingPredictFinish);
        return new Queue(QueuePredictFinishConfig.QUEUE_NAME);
    }
    @Bean
@@ -31,6 +32,6 @@
    // 注意通配符*和#的用法
    @Bean
    Binding bindingExchangeMessagePF() {
        return BindingBuilder.bind(predictFinishQueue()).to(predictFinishExchange()).with(routingPredictFinish);
        return BindingBuilder.bind(predictFinishQueue()).to(predictFinishExchange()).with(RoutingConstant.Iailab_Model_PredictFinish);
    }
}