系统优化
This commit is contained in:
parent
32e37f5bd4
commit
8325ce66f2
@ -47,6 +47,7 @@ var Server struct {
|
||||
GameConfPath string
|
||||
TELOGDIR string
|
||||
GoogleVerify bool
|
||||
Partition int
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
@ -30,6 +30,6 @@
|
||||
"RedisPwd" :"",
|
||||
"GoogleVerify":true,
|
||||
|
||||
"RemoteAddr":"host.docker.internal:9001"
|
||||
|
||||
"RemoteAddr":"host.docker.internal:9001",
|
||||
"Partition":1
|
||||
}
|
||||
|
||||
@ -14,10 +14,8 @@ var topic string
|
||||
|
||||
func init() {
|
||||
topic = conf.Server.GameName
|
||||
partition := 0
|
||||
|
||||
// 连接至Kafka集群的Leader节点
|
||||
conn, err := kafka.DialLeader(context.Background(), "tcp", "kafka-server:9092", topic, partition)
|
||||
conn, err := kafka.DialLeader(context.Background(), "tcp", "kafka-server:9092", topic, conf.Server.Partition)
|
||||
if err != nil {
|
||||
log.Debug("kafka.DialLeader err: %v", err)
|
||||
go reconnectKafka()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user