mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 10:22:36 +08:00
super update
This commit is contained in:
parent
956d745034
commit
1e62ddce73
@ -3,7 +3,6 @@ package gate
|
|||||||
import (
|
import (
|
||||||
"Open_IM/pkg/common/config"
|
"Open_IM/pkg/common/config"
|
||||||
"Open_IM/pkg/common/constant"
|
"Open_IM/pkg/common/constant"
|
||||||
"Open_IM/pkg/common/db"
|
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||||
pbChat "Open_IM/pkg/proto/chat"
|
pbChat "Open_IM/pkg/proto/chat"
|
||||||
@ -93,7 +92,7 @@ func (ws *WServer) getSeqReq(conn *UserConn, m *Req) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeqResp) {
|
func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *sdk_ws.GetMaxAndMinSeqResp) {
|
||||||
log.Debug(m.OperationID, "getSeqResp come here ", pb.String())
|
log.Debug(m.OperationID, "getSeqResp come here ", pb.String())
|
||||||
b, _ := proto.Marshal(pb)
|
b, _ := proto.Marshal(pb)
|
||||||
mReply := Resp{
|
mReply := Resp{
|
||||||
|
@ -51,7 +51,7 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
|||||||
log.Debug(pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
|
log.Debug(pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
|
||||||
for _, v := range grpcCons {
|
for _, v := range grpcCons {
|
||||||
msgClient := pbRelay.NewOnlineMessageRelayServiceClient(v)
|
msgClient := pbRelay.NewOnlineMessageRelayServiceClient(v)
|
||||||
reply, err := msgClient.OnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: []string{pushMsg.PushToUserID}})
|
reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(context.Background(), &pbRelay.OnlineBatchPushOneMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserIDList: []string{pushMsg.PushToUserID}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.NewError("SuperGroupOnlineBatchPushOneMsg push data to client rpc err", pushMsg.OperationID, "err", err)
|
log.NewError("SuperGroupOnlineBatchPushOneMsg push data to client rpc err", pushMsg.OperationID, "err", err)
|
||||||
continue
|
continue
|
||||||
|
@ -431,7 +431,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
|
|||||||
func (rpc *rpcChat) sendMsgToKafka(m *pbChat.MsgDataToMQ, key string, status string) error {
|
func (rpc *rpcChat) sendMsgToKafka(m *pbChat.MsgDataToMQ, key string, status string) error {
|
||||||
switch status {
|
switch status {
|
||||||
case constant.OnlineStatus:
|
case constant.OnlineStatus:
|
||||||
pid, offset, err := rpc.onlineProducer.SendMessage(m, key)
|
pid, offset, err := rpc.onlineProducer.SendMessage(m, key, m.OperationID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(m.OperationID, "kafka send failed", "send data", m.String(), "pid", pid, "offset", offset, "err", err.Error(), "key", key, status)
|
log.Error(m.OperationID, "kafka send failed", "send data", m.String(), "pid", pid, "offset", offset, "err", err.Error(), "key", key, status)
|
||||||
} else {
|
} else {
|
||||||
@ -439,7 +439,7 @@ func (rpc *rpcChat) sendMsgToKafka(m *pbChat.MsgDataToMQ, key string, status str
|
|||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
case constant.OfflineStatus:
|
case constant.OfflineStatus:
|
||||||
pid, offset, err := rpc.onlineProducer.SendMessage(m, key)
|
pid, offset, err := rpc.onlineProducer.SendMessage(m, key, m.OperationID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error(m.OperationID, "kafka send failed", "send data", m.String(), "pid", pid, "offset", offset, "err", err.Error(), "key", key, status)
|
log.Error(m.OperationID, "kafka send failed", "send data", m.String(), "pid", pid, "offset", offset, "err", err.Error(), "key", key, status)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user