作者 tangxvhui

更新 kafka 配置

performance
pkg/constant/kafka_local.go
... ...
... ... @@ -2,14 +2,12 @@ package constant
import "os"
var KAFKA_HOSTS = "1.116.151.79:9092" // 1.116.151.79:9092
var KAFKA_HOSTS = "" // 1.116.151.79:9092
var KAFKA_BOSS_GROUP_ID = "boss_appointment_dev"
var KAFKA_GROUP_ID = "performance_dev"
var KAFKA_BUSINESS_ADMIN_TOPIC = "mmm-business-admin-dev"
var KAFKA_BOSS_APPOINTMENT_TOPIC = "mmm-boss-appointment-dev"
func init() {
if os.Getenv("KAFKA_HOSTS") != "" {
KAFKA_HOSTS = os.Getenv("KAFKA_HOSTS")
... ... @@ -17,10 +15,7 @@ func init() {
if os.Getenv("KAFKA_BUSINESS_ADMIN_TOPIC") != "" {
KAFKA_BUSINESS_ADMIN_TOPIC = os.Getenv("KAFKA_BUSINESS_ADMIN_TOPIC")
}
if os.Getenv("KAFKA_BOSS_GROUP_ID") != "" {
KAFKA_BOSS_GROUP_ID = os.Getenv("KAFKA_BOSS_GROUP_ID")
}
if os.Getenv("KAFKA_BOSS_APPOINTMENT_TOPIC") != "" {
KAFKA_BOSS_APPOINTMENT_TOPIC = os.Getenv("KAFKA_BOSS_APPOINTMENT_TOPIC")
if os.Getenv("KAFKA_GROUP_ID") != "" {
KAFKA_GROUP_ID = os.Getenv("KAFKA_GROUP_ID")
}
}
... ...
... ... @@ -4,6 +4,10 @@ package constant
var KAFKA_HOSTS = "127.0.0.1:9092" // 1.116.151.79:9092
var KAFKA_BOSS_GROUP_ID = "performance"
var KAFKA_BOSS_GROUP_ID = "performance_dev"
var KAFKA_BUSINESS_ADMIN_TOPIC = "mmm-business-admin-dev"
func init() {
}
... ...