【fix sonar】 DelayExchangeBuilder.java文件

This commit is contained in:
tianwenbo
2023-03-09 17:39:26 +08:00
parent 043bd3bc75
commit 522cb7fd61
@@ -15,18 +15,21 @@ public class DelayExchangeBuilder {
/**
* 默认延迟消息交换器
*/
public final static String DEFAULT_DELAY_EXCHANGE = "jero.delayed.exchange";
public static final String DEFAULT_DELAY_EXCHANGE = "jero.delayed.exchange";
/**
* 普通交换器
*/
public final static String DELAY_EXCHANGE = "jero.direct.exchange";
public static final String DELAY_EXCHANGE = "jero.direct.exchange";
private DelayExchangeBuilder() {
}
/**
* 构建延迟消息交换器
* @return
*/
public static CustomExchange buildExchange() {
Map<String, Object> args = new HashMap<String, Object>();
Map<String, Object> args = new HashMap<>();
args.put("x-delayed-type", "direct");
return new CustomExchange(DEFAULT_DELAY_EXCHANGE, "x-delayed-message", true, false, args);
}