撤回延迟

This commit is contained in:
wuchunlei
2024-06-11 17:03:03 +08:00
parent 730693c654
commit 1fdb25fc2e

View File

@@ -236,15 +236,15 @@ public class DelayQueueConfig {
return new Queue(USERVIP_QUEUE, true, false, false, arguments);
}
@Bean
public CustomExchange uservipExchange() {
Map<String, Object> args = new HashMap<>();
args.put("x-delayed-type", "direct");
return new CustomExchange(USERVIP_EXCHANGE, "x-delayed-message", true, false, args);
public DirectExchange uservipExchange() {
return new DirectExchange(USERVIP_EXCHANGE);
}
@Bean
public Binding uservipBinding(@Qualifier("uservipQueue") Queue delayedQueue,
@Qualifier("uservipExchange") Exchange delayedExchange) {
return BindingBuilder.bind(delayedQueue).to(delayedExchange).with(USERVIP_ROUTING_KEY).noargs();
public Binding uservipBinding() {
return BindingBuilder
.bind(uservipQueue())
.to(uservipExchange())
.with(USERVIP_ROUTING_KEY);
}
@Bean
public Queue uservipDeadLetterQueue() {