Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
enoch
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DevOps
enoch
Commits
b746d45f
Commit
b746d45f
authored
Dec 04, 2019
by
jingbo.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改消费者组
parent
ac142cb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
main.go
main.go
+3
-2
No files found.
main.go
View file @
b746d45f
...
@@ -26,7 +26,8 @@ func handlerKafkaMsg() {
...
@@ -26,7 +26,8 @@ func handlerKafkaMsg() {
//处理调用链条信息
//处理调用链条信息
braveTopic
:=
global
.
Config
.
GetOrDefault
(
global
.
NamespaceTechSleuth
,
"tech.brave.kafkaTopic"
,
""
)
braveTopic
:=
global
.
Config
.
GetOrDefault
(
global
.
NamespaceTechSleuth
,
"tech.brave.kafkaTopic"
,
""
)
braveConsumer
,
err
:=
global
.
KafkaRecver
.
NewConsumer
(
global
.
KafkaGroup
,
[]
string
{
braveTopic
},
func
(
msg
*
sarama
.
ConsumerMessage
)
{
braveConsumer
,
err
:=
global
.
KafkaRecver
.
NewConsumer
(
"enoch-group"
,
[]
string
{
braveTopic
},
func
(
msg
*
sarama
.
ConsumerMessage
)
{
pointList
,
err
:=
points
.
TraceBaseInfoToPoint
(
msg
.
Value
)
pointList
,
err
:=
points
.
TraceBaseInfoToPoint
(
msg
.
Value
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"can not make trace point:"
,
err
)
glog
.
Errorf
(
"can not make trace point:"
,
err
)
...
@@ -42,7 +43,7 @@ func handlerKafkaMsg() {
...
@@ -42,7 +43,7 @@ func handlerKafkaMsg() {
//处理基本信息
//处理基本信息
healthTopic
:=
global
.
Config
.
GetOrDefault
(
global
.
NamespaceTechSleuth
,
"tech.enoch.kafkaTopic"
,
""
)
healthTopic
:=
global
.
Config
.
GetOrDefault
(
global
.
NamespaceTechSleuth
,
"tech.enoch.kafkaTopic"
,
""
)
healthConsumer
,
err
:=
global
.
KafkaRecver
.
NewConsumer
(
global
.
KafkaGroup
,
[]
string
{
healthTopic
},
func
(
msg
*
sarama
.
ConsumerMessage
)
{
healthConsumer
,
err
:=
global
.
KafkaRecver
.
NewConsumer
(
"quantGroup-enoch-agent"
,
[]
string
{
healthTopic
},
func
(
msg
*
sarama
.
ConsumerMessage
)
{
pointList
,
err
:=
points
.
HostBaseInfoToPoint
(
msg
.
Value
)
pointList
,
err
:=
points
.
HostBaseInfoToPoint
(
msg
.
Value
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"can not make health point:"
,
err
)
glog
.
Errorf
(
"can not make health point:"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment