From d66e4475926e13188ccbd8f284b293c6eaceacbe Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期三, 11 十二月 2024 18:02:54 +0800
Subject: [PATCH] MQ

---
 shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueueModelAlarmConfig.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/TopicAlarmRabbitConfig.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueueModelAlarmConfig.java
similarity index 63%
rename from shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/TopicAlarmRabbitConfig.java
rename to shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueueModelAlarmConfig.java
index da4f90e..45edacc 100644
--- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/TopicAlarmRabbitConfig.java
+++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueueModelAlarmConfig.java
@@ -1,7 +1,6 @@
 package com.iailab.module.shasteel.mq.config;
 
-import com.iailab.module.shasteel.mq.consumer.AlarmMessage;
-import com.iailab.module.shasteel.mq.consumer.PredictFinishMessage;
+import com.iailab.module.shasteel.mq.common.RoutingConstant;
 import org.springframework.amqp.core.Binding;
 import org.springframework.amqp.core.BindingBuilder;
 import org.springframework.amqp.core.Queue;
@@ -10,28 +9,30 @@
 import org.springframework.context.annotation.Configuration;
 
 /**
+ * 绑定队列
+ *
  * @author lirm
  * @Description
  * @createTime 2024年11月27日
  */
 @Configuration
-public class TopicAlarmRabbitConfig {
-    //绑定键
-    public final static String routingAlarm = AlarmMessage.ALARM_ROUTING_KEY;
+public class QueueModelAlarmConfig {
+    // 队列名称
+    public final static String QUEUE_NAME = "IaiabFastShateel.Model.Alarm";
 
     @Bean
     public Queue alarmQueue() {
-        return new Queue(TopicAlarmRabbitConfig.routingAlarm);
+        return new Queue(QUEUE_NAME);
     }
 
     @Bean
     TopicExchange alarmExchange() {
-        return new TopicExchange(AlarmMessage.EXCHANGE);
+        return new TopicExchange(RoutingConstant.EXCHANGE);
     }
 
     // 注意通配符*和#的用法
     @Bean
     Binding bindingExchangeMessageAlarm() {
-        return BindingBuilder.bind(alarmQueue()).to(alarmExchange()).with(routingAlarm);
+        return BindingBuilder.bind(alarmQueue()).to(alarmExchange()).with(RoutingConstant.Iailab_Model_Alarm);
     }
 }

--
Gitblit v1.9.3