mq队列 关闭监听端

队列存活时间
This commit is contained in:
2025-02-25 17:55:12 +08:00
parent 6b4d9d6758
commit 978f7f1bdb
2 changed files with 46 additions and 46 deletions

View File

@@ -25,8 +25,8 @@ public class RabbitConfig {
Map<String, Object> args = new HashMap<>();
// 设置消息过期时间为 180000 毫秒(即 180 秒)
args.put("x-message-ttl", 180000);
// return new Queue(activeProfile + "-" + RabbitConstants.Queue.ORDER_PRINT_QUEUE, true, false, false, args);
return new Queue(activeProfile + "-" + RabbitConstants.Queue.ORDER_PRINT_QUEUE, true, false, false, null);
return new Queue(activeProfile + "-" + RabbitConstants.Queue.ORDER_PRINT_QUEUE, true, false, false, args);
// return new Queue(activeProfile + "-" + RabbitConstants.Queue.ORDER_PRINT_QUEUE, true, false, false, null);
}
@Bean