This commit is contained in:
dute7liang
2024-01-25 21:21:20 +08:00
parent 13fa059d02
commit 78e381be13
8 changed files with 16 additions and 15 deletions

View File

@@ -15,7 +15,7 @@ public class RoomCheckDelayMqConfig {
public static final String ROUTING_KEY = "roomCheckDelayRouting";
@Bean
public CustomExchange delayedExchange() {
public CustomExchange roomCheckDelayedExchange() {
HashMap<String,Object> args = new HashMap<>();
args.put("x-delayed-type", "direct");
return new CustomExchange(EXCHANGE_NAME,
@@ -26,15 +26,15 @@ public class RoomCheckDelayMqConfig {
}
@Bean
public Queue delayedQueue() {
public Queue roomCheckDelayedQueue() {
return QueueBuilder.durable(QUEUE_NAME)
.withArgument("x-delayed-type", "direct")
.build();
}
@Bean
public Binding delayedBinding(Queue delayedQueue,CustomExchange delayedExchange) {
return BindingBuilder.bind(delayedQueue).to(delayedExchange).with(ROUTING_KEY).noargs();
public Binding roomCheckDelayedBinding(Queue roomCheckDelayedQueue,CustomExchange roomCheckDelayedExchange) {
return BindingBuilder.bind(roomCheckDelayedQueue).to(roomCheckDelayedExchange).with(ROUTING_KEY).noargs();
}
}

View File

@@ -15,7 +15,7 @@ public class RoomSettleDelayMqConfig {
public static final String ROUTING_KEY = "roomSettleDelayRouting";
@Bean
public CustomExchange delayedExchange() {
public CustomExchange roomSettleDelayedExchange() {
HashMap<String,Object> args = new HashMap<>();
args.put("x-delayed-type", "direct");
return new CustomExchange(EXCHANGE_NAME,
@@ -26,15 +26,15 @@ public class RoomSettleDelayMqConfig {
}
@Bean
public Queue delayedQueue() {
public Queue roomSettleDelayedQueue() {
return QueueBuilder.durable(QUEUE_NAME)
.withArgument("x-delayed-type", "direct")
.build();
}
@Bean
public Binding delayedBinding(Queue delayedQueue,CustomExchange delayedExchange) {
return BindingBuilder.bind(delayedQueue).to(delayedExchange).with(ROUTING_KEY).noargs();
public Binding roomSettleDelayedBinding(Queue roomSettleDelayedQueue,CustomExchange roomSettleDelayedExchange) {
return BindingBuilder.bind(roomSettleDelayedQueue).to(roomSettleDelayedExchange).with(ROUTING_KEY).noargs();
}
}