正在显示
4 个修改的文件
包含
14 行增加
和
2 行删除
@@ -80,6 +80,8 @@ spec: | @@ -80,6 +80,8 @@ spec: | ||
80 | value: "http://suplus-business-admin-dev.fjmaimaimai.com" | 80 | value: "http://suplus-business-admin-dev.fjmaimaimai.com" |
81 | - name: KAFKA_HOST | 81 | - name: KAFKA_HOST |
82 | value: "106.52.15.41:9092" | 82 | value: "106.52.15.41:9092" |
83 | + - name: KAFKA_CONSUMER_ID | ||
84 | + value: "partnermg_dev" | ||
83 | volumes: | 85 | volumes: |
84 | - name: accesslogs | 86 | - name: accesslogs |
85 | emptyDir: {} | 87 | emptyDir: {} |
@@ -78,6 +78,10 @@ spec: | @@ -78,6 +78,10 @@ spec: | ||
78 | value: "rsF0pL!6DwjBO735" | 78 | value: "rsF0pL!6DwjBO735" |
79 | - name: BUSINESS_ADMIN_HOST | 79 | - name: BUSINESS_ADMIN_HOST |
80 | value: "http://suplus-business-admin-prd.fjmaimaimai.com" | 80 | value: "http://suplus-business-admin-prd.fjmaimaimai.com" |
81 | + - name: KAFKA_HOST | ||
82 | + value: "" | ||
83 | + - name: KAFKA_CONSUMER_ID | ||
84 | + value: "partnermg_test" | ||
81 | volumes: | 85 | volumes: |
82 | - name: accesslogs | 86 | - name: accesslogs |
83 | - emptyDir: {} | ||
87 | + emptyDir: {} |
@@ -77,6 +77,8 @@ spec: | @@ -77,6 +77,8 @@ spec: | ||
77 | value: "http://suplus-business-admin-test.fjmaimaimai.com" | 77 | value: "http://suplus-business-admin-test.fjmaimaimai.com" |
78 | - name: KAFKA_HOST | 78 | - name: KAFKA_HOST |
79 | value: "106.52.15.41:9092" | 79 | value: "106.52.15.41:9092" |
80 | + - name: KAFKA_CONSUMER_ID | ||
81 | + value: "partnermg_test" | ||
80 | volumes: | 82 | volumes: |
81 | - name: accesslogs | 83 | - name: accesslogs |
82 | emptyDir: {} | 84 | emptyDir: {} |
@@ -15,12 +15,16 @@ var KafkaCfg KafkaConfig | @@ -15,12 +15,16 @@ var KafkaCfg KafkaConfig | ||
15 | func init() { | 15 | func init() { |
16 | KafkaCfg = KafkaConfig{ | 16 | KafkaCfg = KafkaConfig{ |
17 | Servers: []string{"106.52.15.41:9092"}, | 17 | Servers: []string{"106.52.15.41:9092"}, |
18 | - ConsumerId: "partnermg", | 18 | + ConsumerId: "partnermg_dev", |
19 | } | 19 | } |
20 | if os.Getenv("KAFKA_HOST") != "" { | 20 | if os.Getenv("KAFKA_HOST") != "" { |
21 | kafkaHost := os.Getenv("KAFKA_HOST") | 21 | kafkaHost := os.Getenv("KAFKA_HOST") |
22 | KafkaCfg.Servers = strings.Split(kafkaHost, ";") | 22 | KafkaCfg.Servers = strings.Split(kafkaHost, ";") |
23 | } | 23 | } |
24 | + if os.Getenv("KAFKA_CONSUMER_ID") != "" { | ||
25 | + consumerId := os.Getenv("KAFKA_CONSUMER_ID") | ||
26 | + KafkaCfg.ConsumerId = consumerId | ||
27 | + } | ||
24 | } | 28 | } |
25 | 29 | ||
26 | // "192.168.190.136:9092", | 30 | // "192.168.190.136:9092", |
-
请 注册 或 登录 后发表评论