Skip to content

Commit

Permalink
Merge pull request #741 from katepangLiu/main
Browse files Browse the repository at this point in the history
fix: [inputs/rocketmq] 修复 msgDiff queue维度聚合逻辑
  • Loading branch information
kongfei605 committed Dec 22, 2023
2 parents 788e566 + 1f9021b commit 85f7b79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inputs/rocketmq_offset/rocketmq.go
Expand Up @@ -86,7 +86,7 @@ func (ins *Instance) Gather(slist *types.SampleList) {
// var diff_Clientinfo_Slice []model.MsgDiff_ClientInfo = []model.MsgDiff_ClientInfo{}
var diff_Clientinfo_Map = make(map[string]*MsgDiffClientInfo)

// 按照queue聚合msgDiff
// 按照broker:queue聚合msgDiff
// var MsgDiff_Queue_Slice []model.MsgDiff_Queue = []model.MsgDiff_Queue{}
var diff_Queue_Map = make(map[string]*MsgDiffQueue)

Expand Down Expand Up @@ -204,9 +204,9 @@ func (ins *Instance) Gather(slist *types.SampleList) {
diff_Broker_Map[brokerName] = diff_Broker
}

// 按照queueId进行msgDiff聚合
queuestr := brokerName + ":" + string(queueId)
if _, ok := diff_Queue_Map[string(queueId)]; ok {
// 按照brokerName:queueId进行msgDiff聚合
queuestr := brokerName + ":" + fmt.Sprint(queueId)
if _, ok := diff_Queue_Map[queuestr]; ok {
diff_Queue_Map[queuestr].Diff = diff_Queue_Map[queuestr].Diff + diff
} else {
var diff_Queue *MsgDiffQueue = new(MsgDiffQueue)
Expand Down

0 comments on commit 85f7b79

Please sign in to comment.