From 0e9c0dff257f69a8adac8982ddf2410d1d42a9d0 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 16 Sep 2023 15:18:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consume/zhios_fast_return_order_pay.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/consume/zhios_fast_return_order_pay.go b/consume/zhios_fast_return_order_pay.go index f12b5e0..2a027f6 100644 --- a/consume/zhios_fast_return_order_pay.go +++ b/consume/zhios_fast_return_order_pay.go @@ -28,7 +28,7 @@ func ZhiosFastReturnOrderPay(queue md.MqQueue) { //1、将自己绑定到交换机上 ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) //2、取出数据进行消费 - ch.Qos(20) + ch.Qos(10) delivery := ch.Consume(queue.Name, false) var res amqp.Delivery @@ -44,16 +44,16 @@ func ZhiosFastReturnOrderPay(queue md.MqQueue) { if err == nil { _ = res.Ack(true) } else { - var canalMsg *md.ZhiosFatReturnOrderPay - var tmpString string - err := json.Unmarshal(res.Body, &tmpString) - if err == nil { - fmt.Println(tmpString) - err = json.Unmarshal([]byte(tmpString), &canalMsg) - if err == nil { - ch.Publish(queue.ExchangeName, utils.SerializeStr(canalMsg), queue.RoutKey) - } - } + //var canalMsg *md.ZhiosFatReturnOrderPay + //var tmpString string + //err := json.Unmarshal(res.Body, &tmpString) + //if err == nil { + // fmt.Println(tmpString) + // err = json.Unmarshal([]byte(tmpString), &canalMsg) + // if err == nil { + // ch.Publish(queue.ExchangeName, utils.SerializeStr(canalMsg), queue.RoutKey) + // } + //} } } else {