From cc7d28f6a5df2dedb6d27f436e99c48df6c267b4 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期一, 14 三月 2022 17:48:41 +0800 Subject: [PATCH] 党建bug修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/RabbitmqConfig.java | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/RabbitmqConfig.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/RabbitmqConfig.java index d95d80b..0f405e8 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/RabbitmqConfig.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/RabbitmqConfig.java @@ -25,6 +25,9 @@ public static final String RAFFLE_ROUTING_KEY="raffle.key"; public static final String RAFFLE_EXCHANGE="raffle.exchange"; + public static final String McsOrder_QUEUE="mcsOrder.queue"; + public static final String McsOrder_ROUTING_KEY="mcsOrder.key"; + public static final String McsOrder_EXCHANGE="mcsOrder.exchange"; @Bean @@ -62,6 +65,23 @@ } @Bean + public Queue mcsOrderQueue(){ + return new Queue(McsOrder_QUEUE,true,false,false,null); + } + + @Bean + public Exchange mcsOrderExchange(){ + Map<String, Object> arguments = new HashMap<>(); + arguments.put("x-delayed-type", ExchangeTypes.DIRECT); + return new CustomExchange(McsOrder_EXCHANGE,"x-delayed-message",true,false,arguments); + } + + @Bean + public Binding mcsOrderBinding(){ + return BindingBuilder.bind(mcsOrderQueue()).to(mcsOrderExchange()).with(McsOrder_ROUTING_KEY).noargs(); + } + + @Bean public Queue orderQueue(){ return new Queue(Order_QUEUE,true,false,false,null); } -- Gitblit v1.7.1