Browse Source

修复Pan 开单会推的时候 报错问题 2

training
pref_mail@163.com 1 year ago
parent
commit
7c946bf4e8
  1. 30
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java

30
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/config/RabbitMqConfiguration.java

@ -1,3 +1,4 @@
/*
package com.logpm.oldproject.config;
import com.alibaba.nacos.shaded.com.google.common.collect.Maps;
@ -14,11 +15,13 @@ import org.springframework.context.annotation.Configuration;
import java.util.Map;
*/
/**
* RabbitMQ配置主要是配置队列如果提前存在该队列可以省略本配置类
*
* @author yangkai.shen
*/
*//*
@Slf4j
@Configuration
public class RabbitMqConfiguration {
@ -76,28 +79,34 @@ public class RabbitMqConfiguration {
return BindingBuilder.bind(errorQueue).to(errorMessageExchange).with(RabbitConstant.ERROR_ROUTING);
}
/**
*/
/**
* 消费失败队列
* @param rabbitTemplate
* @return
*/
*//*
@Bean
public MessageRecoverer republishMessageRecoverer(RabbitTemplate rabbitTemplate){
return new RepublishMessageRecoverer(rabbitTemplate, RabbitConstant.ERROR_EXCHANGE, RabbitConstant.ERROR_ROUTING);
}
/**
*/
/**
* 延迟队列
*/
*//*
@Bean
public Queue orderStatusQueue() {
return new Queue(RabbitConstant.ORDER_STATUS_QUEUE, true);
}
/**
*/
/**
* 延迟队列交换器, x-delayed-type x-delayed-message 固定
*/
*//*
@Bean
public CustomExchange orderStatusExchange() {
Map<String, Object> args = Maps.newHashMap();
@ -105,12 +114,14 @@ public class RabbitMqConfiguration {
return new CustomExchange(RabbitConstant.ORDER_STATUS_EXCHANGE, "x-delayed-message", true, false, args);
}
/**
*/
/**
* 延迟队列绑定自定义交换器
*
* @param orderStatusQueue 队列
* @param orderStatusExchange 延迟交换器
*/
*//*
@Bean
public Binding orderStatusBinding(Queue orderStatusQueue, CustomExchange orderStatusExchange) {
return BindingBuilder.bind(orderStatusQueue).to(orderStatusExchange).with(RabbitConstant.ORDER_STATUS_ROUTING).noargs();
@ -123,3 +134,4 @@ public class RabbitMqConfiguration {
}
*/

Loading…
Cancel
Save