This commit is contained in:
wangchuxiao
2023-05-10 20:27:39 +08:00
parent 042d4ca670
commit 150089c2b9
11 changed files with 26 additions and 41 deletions
@@ -20,7 +20,7 @@ import (
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
"github.com/Shopify/sarama"
"github.com/go-redis/redis"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/proto"
)
const ConsumerMsgs = 3
@@ -104,7 +104,6 @@ func (mc *OnlineHistoryMongoConsumerHandler) ConsumeClaim(sess sarama.ConsumerGr
for msg := range claim.Messages() {
ctx := mc.historyConsumerGroup.GetContextFromMsg(msg)
if len(msg.Value) != 0 {
log.ZDebug(ctx, "mongo consumer recv new msg", "conversationID", msg.Key, "offset", msg.Offset)
mc.handleChatWs2Mongo(ctx, msg, string(msg.Key), sess)
} else {
log.ZError(ctx, "mongo msg get from kafka but is nil", nil, "conversationID", msg.Key)