Skip to content

Commit

Permalink
[INLONG-11587][TubeMQ] Go SDK change filter order cause inconsistency…
Browse files Browse the repository at this point in the history
… error when registering to master

Co-authored-by: leonyue <[email protected]>
  • Loading branch information
yuexihan and leonyue authored Dec 6, 2024
1 parent 819e947 commit 1183e43
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package sub

import (
"strconv"
"strings"
"sync/atomic"
"time"

Expand Down Expand Up @@ -64,16 +65,10 @@ func NewSubInfo(config *config.Config) *SubInfo {
s.topicFilter = make(map[string]bool)
for topic, filters := range config.Consumer.TopicFilters {
cond := topic + "#"
count := 0
if len(filters) > 0 {
s.topicFilter[topic] = true
}
for _, filter := range filters {
if count > 0 {
cond += ","
}
cond += filter
}
cond += strings.Join(filters, ",")
s.topicConds = append(s.topicConds, cond)
}
if config.Consumer.BoundConsume {
Expand Down

0 comments on commit 1183e43

Please sign in to comment.