From 72f0998a5cb76849bc75987e9cf3f51cba8cb065 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 20 Dec 2023 17:13:58 +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_order_hjy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/consume/zhios_order_hjy.go b/consume/zhios_order_hjy.go index 86342db..b64ab72 100644 --- a/consume/zhios_order_hjy.go +++ b/consume/zhios_order_hjy.go @@ -32,7 +32,7 @@ func ZhiosOrderHjy(queue md.MqQueue) { //1、将自己绑定到交换机上 ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) //2、取出数据进行消费 - ch.Qos(20) + ch.Qos(1) delivery := ch.Consume(queue.Name, false) var res amqp.Delivery @@ -117,6 +117,7 @@ func KsortToStr(params map[string]string) []string { return keys } func handleZhiosOrderHjy(msg []byte) error { + time.Sleep(time.Microsecond * 20) // 等待500毫秒 //1、解析canal采集至mq中queue的数据结构体 var canalMsg *md.ZhiosOrderBuckle fmt.Println(string(msg))