add save message to mysql switch

This commit is contained in:
Gordon
2022-04-20 18:53:23 +08:00
committed by Xinwei Xiong(cubxxw-openim)
parent a525db7088
commit ece1dac81a
2 changed files with 10 additions and 10 deletions
+6 -2
View File
@@ -2,8 +2,8 @@ package logic
import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/kafka"
"fmt"
)
var (
@@ -20,6 +20,10 @@ func Init() {
}
func Run() {
//register mysqlConsumerHandler to
go persistentCH.persistentConsumerGroup.RegisterHandleAndConsumer(&persistentCH)
if config.Config.ChatPersistenceMysql {
go persistentCH.persistentConsumerGroup.RegisterHandleAndConsumer(&persistentCH)
} else {
fmt.Println("not start mysql consumer")
}
go historyCH.historyConsumerGroup.RegisterHandleAndConsumer(&historyCH)
}