mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-11 23:47:32 +08:00
transfer
This commit is contained in:
parent
b86966d0d9
commit
34648559b7
@ -88,7 +88,7 @@ func GetMessage() {
|
||||
}
|
||||
fmt.Println(partitionList)
|
||||
//var ch chan int
|
||||
msgRpcClient, err := GetMsgRpcService()
|
||||
//msgRpcClient, err := GetMsgRpcService()
|
||||
if err != nil {
|
||||
fmt.Printf("rpc err:%s", err)
|
||||
}
|
||||
@ -104,15 +104,15 @@ func GetMessage() {
|
||||
go func(sarama.PartitionConsumer) {
|
||||
defer wg.Done()
|
||||
for msg := range pc.Messages() {
|
||||
Transfer([]*sarama.ConsumerMessage{msg}, msgRpcClient)
|
||||
//Transfer([]*sarama.ConsumerMessage{msg}, msgRpcClient)
|
||||
|
||||
//V2
|
||||
//msgFromMQV2 := pbMsg.MsgDataToMQ{}
|
||||
//err := proto.Unmarshal(msg.Value, &msgFromMQV2)
|
||||
//if err != nil {
|
||||
// fmt.Printf("err:%s \n", err)
|
||||
//}
|
||||
//fmt.Printf("msg:%s \n", &msgFromMQV2)
|
||||
msgFromMQV2 := pbMsg.MsgDataToMQ{}
|
||||
err := proto.Unmarshal(msg.Value, &msgFromMQV2)
|
||||
if err != nil {
|
||||
fmt.Printf("err:%s \n", err)
|
||||
}
|
||||
fmt.Printf("msg:%s \n", &msgFromMQV2)
|
||||
|
||||
//V3
|
||||
//msgFromMQ := &sdkws.MsgData{}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user