diff --git a/01-placeorder/src/main/java/com/mashibing/config/RabbitTemplateConfig.java b/01-placeorder/src/main/java/com/mashibing/config/RabbitTemplateConfig.java index 4f17a6d..a4bfdc6 100644 --- a/01-placeorder/src/main/java/com/mashibing/config/RabbitTemplateConfig.java +++ b/01-placeorder/src/main/java/com/mashibing/config/RabbitTemplateConfig.java @@ -44,6 +44,7 @@ public class RabbitTemplateConfig { return new RabbitTemplate.ConfirmCallback(){ @Override public void confirm(CorrelationData correlationData, boolean ack, String cause) { + System.out.println("confirm:" + Thread.currentThread().getName()); if (correlationData == null) return; String msgId = correlationData.getId(); if(ack){ diff --git a/01-placeorder/src/main/java/com/mashibing/controller/PlaceOrderController.java b/01-placeorder/src/main/java/com/mashibing/controller/PlaceOrderController.java index 0b6728c..e1744e0 100644 --- a/01-placeorder/src/main/java/com/mashibing/controller/PlaceOrderController.java +++ b/01-placeorder/src/main/java/com/mashibing/controller/PlaceOrderController.java @@ -37,10 +37,10 @@ public class PlaceOrderController { public String po(){ long start = System.currentTimeMillis(); //1、调用库存服务扣除商品库存 - itemStockClient.decr(); +// itemStockClient.decr(); //2、调用订单服务,创建订单 - orderManageClient.create(); - +// orderManageClient.create(); + System.out.println(Thread.currentThread().getName()); // 将之前的同步方式注释 String userAndOrderInfo = "用户信息&订单信息&优惠券信息等等…………"; // 声明当前消息的id标识