mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-13 16:47:36 +08:00
v2 transfer
This commit is contained in:
parent
a707cc39af
commit
9e260ec9f5
@ -33,8 +33,8 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
topic = "ws2ms_chat"
|
topic = "ws2ms_chat"
|
||||||
addr = "127.0.0.1:9092"
|
//addr = "127.0.0.1:9092"
|
||||||
//addr = "43.128.72.19:9092"
|
addr = "43.128.72.19:9092"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -95,7 +95,7 @@ func GetMessage() {
|
|||||||
for partition := range partitionList {
|
for partition := range partitionList {
|
||||||
pc, err := consumer.ConsumePartition(topic, int32(partition), sarama.OffsetOldest)
|
pc, err := consumer.ConsumePartition(topic, int32(partition), sarama.OffsetOldest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
defer pc.AsyncClose()
|
defer pc.AsyncClose()
|
||||||
@ -111,7 +111,7 @@ func GetMessage() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("err:%s \n", err)
|
fmt.Printf("err:%s \n", err)
|
||||||
}
|
}
|
||||||
fmt.Printf("msg:%s \n", &msgFromMQV2)
|
fmt.Printf("msg:%s \n", msgFromMQV2)
|
||||||
|
|
||||||
//V3
|
//V3
|
||||||
//msgFromMQ := &sdkws.MsgData{}
|
//msgFromMQ := &sdkws.MsgData{}
|
||||||
@ -120,7 +120,7 @@ func GetMessage() {
|
|||||||
// fmt.Printf("err:%s \n", err)
|
// fmt.Printf("err:%s \n", err)
|
||||||
//}
|
//}
|
||||||
//fmt.Printf("msg:%s \n", &msgFromMQ)
|
//fmt.Printf("msg:%s \n", &msgFromMQ)
|
||||||
//fmt.Printf("Partition:%d, Offset:%d, Key:%s, Value:%s\n", msg.Partition, msg.Offset, string(msg.Key), string(msg.Value))
|
fmt.Printf("Partition:%d, Offset:%d, Key:%s, Value:%s\n", msg.Partition, msg.Offset, string(msg.Key), string(msg.Value))
|
||||||
}
|
}
|
||||||
|
|
||||||
}(pc)
|
}(pc)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user