mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-31 03:23:43 +08:00
kafka topic优化及解释,删除废弃topic的冗余代码 (#255)
This commit is contained in:
parent
c4ee293388
commit
547ad7a2c7
@ -45,16 +45,16 @@ redis:
|
||||
kafka:
|
||||
ws2mschat:
|
||||
addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
|
||||
topic: "ws2ms_chat"
|
||||
ws2mschatoffline:
|
||||
addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
|
||||
topic: "ws2ms_chat_offline"
|
||||
topic: "ws2ms_chat" #用于mongo和mysql保存消息
|
||||
# ws2mschatoffline:
|
||||
# addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
|
||||
# topic: "ws2ms_chat_offline" #原为离线用户消息处理,目前暂时弃用
|
||||
msgtomongo:
|
||||
addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
|
||||
topic: "msg_to_mongo"
|
||||
ms2pschat:
|
||||
addr: [ 127.0.0.1:9092 ] #kafka配置,默认即可
|
||||
topic: "ms2ps_chat"
|
||||
topic: "ms2ps_chat" #消息push
|
||||
consumergroupid:
|
||||
msgToTransfer: mongo
|
||||
msgToMongo: mongo_ex
|
||||
|
@ -21,8 +21,8 @@ type rpcChat struct {
|
||||
etcdSchema string
|
||||
etcdAddr []string
|
||||
onlineProducer *kafka.Producer
|
||||
offlineProducer *kafka.Producer
|
||||
delMsgCh chan deleteMsg
|
||||
//offlineProducer *kafka.Producer
|
||||
delMsgCh chan deleteMsg
|
||||
}
|
||||
|
||||
type deleteMsg struct {
|
||||
@ -41,7 +41,7 @@ func NewRpcChatServer(port int) *rpcChat {
|
||||
etcdAddr: config.Config.Etcd.EtcdAddr,
|
||||
}
|
||||
rc.onlineProducer = kafka.NewKafkaProducer(config.Config.Kafka.Ws2mschat.Addr, config.Config.Kafka.Ws2mschat.Topic)
|
||||
rc.offlineProducer = kafka.NewKafkaProducer(config.Config.Kafka.Ws2mschatOffline.Addr, config.Config.Kafka.Ws2mschatOffline.Topic)
|
||||
//rc.offlineProducer = kafka.NewKafkaProducer(config.Config.Kafka.Ws2mschatOffline.Addr, config.Config.Kafka.Ws2mschatOffline.Topic)
|
||||
rc.delMsgCh = make(chan deleteMsg, 1000)
|
||||
return &rc
|
||||
}
|
||||
|
@ -213,10 +213,10 @@ type config struct {
|
||||
Addr []string `yaml:"addr"`
|
||||
Topic string `yaml:"topic"`
|
||||
}
|
||||
Ws2mschatOffline struct {
|
||||
Addr []string `yaml:"addr"`
|
||||
Topic string `yaml:"topic"`
|
||||
}
|
||||
//Ws2mschatOffline struct {
|
||||
// Addr []string `yaml:"addr"`
|
||||
// Topic string `yaml:"topic"`
|
||||
//}
|
||||
MsgToMongo struct {
|
||||
Addr []string `yaml:"addr"`
|
||||
Topic string `yaml:"topic"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user