【fix sonar】 DelayExchangeBuilder.java文件
This commit is contained in:
+6
-3
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user