YitianJiang
YitianJiang
你这个mongodb 和mysql消费消息的时候,为了避免重复消费消息,你写了个 history_msg_handler.go 97行 sess.MarkMessage(msg, "") **但是saram提供的这个接口是让你自己去实现 saram 并没有实现这MarkMessage个接口** 我觉得你想做的应该是:消费完消息后把消息的唯一标识写进redis里面 然后,每次消费消息前都去redis里面查这条消息的标识,有,就被消费过,会导致重复消费 
history_msg_handler.go 67行 
if in.GetSessionType() == constant.SingleChatType { userIDList = genUidPlatformArray(in.SendID) for _, v := range userIDList { UIDAndPID = strings.Split(v, " ") if conn := ws.getUserConn(v); conn != nil { _ =...
if sendPbData.ContentType != constant.Typing && sendPbData.ContentType != constant.HasReadReceipt { if **_isOfflinePush_** { for _, v := range wsResult { if v.ResultCode == 0 { continue
isPersist := utils.GetSwitchFromOptions(Options, "persistent") switch pbData.SessionType { case constant.SingleChatType: log.NewDebug(pbSaveData.OperationID, "msg_transfer chat type = SingleChatType", isHistory, isPersist) if **_isHistory_** { if msgKey == pbSaveData.RecvID { err := saveUserChat(pbData.RecvID, &pbSaveData) if...
这块: **If the wrapper was idle too long, close the connection and create a new one.** // If the wrapper was idle too long, close the connection and create a...
// "%s:///%s/" func GetPrefix(schema, serviceName string) string { return fmt.Sprintf("%s:///%s/", schema, serviceName) } // "%s:///%s" func GetPrefix4Unique(schema, serviceName string) string { return fmt.Sprintf("%s:///%s", schema, serviceName) }
这里有一个bug 279行在slave上执行shell脚本的时候没有用sh filename的方式,提示权限不够 slave加入不成功 这一行: scp base.config hwclock_ntp.sh node_install_k8s.sh ssh_trust_init.exp ssh_trust_add.exp root@$host:/root && scp /etc/hosts root@$host:/etc/hosts && ssh root@$host "hostnamectl set-hostname $hostname$num" && ssh root@$host **_/root/hwclock_ntp.sh_** && ssh root@$host **_/root/node_install_k8s.sh_**...