diff --git a/config/config.yaml b/config/config.yaml index 1eb0122ce..d5655953c 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -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 diff --git a/internal/rpc/msg/rpcChat.go b/internal/rpc/msg/rpcChat.go index d7fde26f3..95f0ceaa5 100644 --- a/internal/rpc/msg/rpcChat.go +++ b/internal/rpc/msg/rpcChat.go @@ -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 } diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 6addffc22..acade2fd2 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -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"`