From 52a2bad9ce31a764a9c2426e7e6d889487a7187a Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期三, 19 二月 2025 09:47:29 +0800 Subject: [PATCH] 两个队列给两个消费者,才能让消息消费两遍 --- shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueuePredictFinishConfig.java | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueuePredictFinishConfig.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueuePredictFinishConfig.java index 334bdd7..b28d52a 100644 --- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueuePredictFinishConfig.java +++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/mq/config/QueuePredictFinishConfig.java @@ -17,10 +17,29 @@ public class QueuePredictFinishConfig { // 队列名称 public final static String QUEUE_NAME = "IaiabFastShateel.Model.PredictFinish"; + public final static String QUEUE_NAME2 = "IaiabFastShateel.Model.PredictFinish2"; + + public final static String QUEUE_NAME_ELEC = "IaiabFastShateel.Model.PredictFinish.Elec"; + + public final static String QUEUE_NAME_LDG = "IaiabFastShateel.Model.PredictFinish.LDG"; @Bean public Queue predictFinishQueue() { return new Queue(QueuePredictFinishConfig.QUEUE_NAME); + } + @Bean + public Queue predictFinishQueue2() { + return new Queue(QueuePredictFinishConfig.QUEUE_NAME2); + } + + @Bean + public Queue predictFinishQueueElec() { + return new Queue(QueuePredictFinishConfig.QUEUE_NAME_ELEC); + } + + @Bean + public Queue predictFinishQueueLDG() { + return new Queue(QueuePredictFinishConfig.QUEUE_NAME_LDG); } @Bean @@ -33,4 +52,18 @@ Binding bindingExchangeMessagePF() { return BindingBuilder.bind(predictFinishQueue()).to(predictFinishExchange()).with(RoutingConstant.Iailab_Model_PredictFinish); } + @Bean + Binding bindingExchangeMessagePF2() { + return BindingBuilder.bind(predictFinishQueue2()).to(predictFinishExchange()).with(RoutingConstant.Iailab_Model_PredictFinish); + } + + @Bean + Binding bindingExchangeMessageElec() { + return BindingBuilder.bind(predictFinishQueueElec()).to(predictFinishExchange()).with(RoutingConstant.Iailab_Model_PredictFinish_Elec); + } + + @Bean + Binding bindingExchangeMessageLDG() { + return BindingBuilder.bind(predictFinishQueueLDG()).to(predictFinishExchange()).with(RoutingConstant.Iailab_Model_PredictFinish_LDG); + } } -- Gitblit v1.9.3