From d242cf8dfd083533e9ca7bca3196f0c82797d4b7 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Tue, 31 Dec 2024 12:00:38 +0800 Subject: [PATCH] 1 --- consume/user_register_for_official_consume.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consume/user_register_for_official_consume.go b/consume/user_register_for_official_consume.go index c6e4849..0cc093f 100644 --- a/consume/user_register_for_official_consume.go +++ b/consume/user_register_for_official_consume.go @@ -35,7 +35,7 @@ func UserRegisterConsumeForOfficial(queue md.MqQueue) { //1、将自己绑定到交换机上 ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) //2、取出数据进行消费 - ch.Qos(100) // 设置QoS为100,确保一次最多处理100个消息 + ch.Qos(1) // 设置QoS为100,确保一次最多处理100个消息 delivery := ch.Consume(queue.Name, false) batchSize := 100 @@ -118,7 +118,6 @@ func handleUserRegisterConsumeForOfficial(msgData []byte) error { return err } if gimUser == nil { - fmt.Println("===========================", msg.Phone) user, err := db.UserFindByMobile(db.Db, strconv.FormatInt(msg.Phone, 10)) if err != nil { return err @@ -169,6 +168,7 @@ func handleUserRegisterConsumeForOfficial(msgData []byte) error { officialGroup = group } } + fmt.Println("===========================", gimUser) if officialGroup.GroupId == 0 { groupName := "官方【" + utils2.AnyToString(len(*officialGroups)+1) + "】群"