1.增加库存记录mq处理

This commit is contained in:
2024-08-01 14:22:33 +08:00
parent b8a60a1549
commit 7c122565fc
4 changed files with 23 additions and 16 deletions

View File

@@ -14,6 +14,8 @@ public class RabbitConfig {
public static final String ROUTING_STOCK_RECORD_SALE = "routing.stock.record.sale";
public static final String QUEUE_STOCK_RECORD = "queue.stock.record";
public static final String ROUTING_STOCK_RECORD= "routing.stock.record";
@Bean
Queue stockRecordSaleQueue() {
@@ -29,4 +31,14 @@ public class RabbitConfig {
Binding binding(Queue stockRecordSaleQueue, DirectExchange stockRecordExchange) {
return BindingBuilder.bind(stockRecordSaleQueue).to(stockRecordExchange).with(ROUTING_STOCK_RECORD_SALE);
}
@Bean
Queue stockRecordSaleQueue2() {
return new Queue(QUEUE_STOCK_RECORD);
}
@Bean
Binding binding2(Queue stockRecordSaleQueue2, DirectExchange stockRecordExchange) {
return BindingBuilder.bind(stockRecordSaleQueue2).to(stockRecordExchange).with(ROUTING_STOCK_RECORD);
}
}