Skip to content

Commit

Permalink
[ISSUE #931] fix filter message (#932)
Browse files Browse the repository at this point in the history
Co-authored-by: wuxb02 <[email protected]>
  • Loading branch information
0daypwn and wuxb02 authored Oct 31, 2022
1 parent 5779439 commit c197b50
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,18 @@ package consumer
import (
"context"
"fmt"
"github.com/apache/rocketmq-client-go/v2/hooks"
"sort"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"

"github.com/apache/rocketmq-client-go/v2/errors"

jsoniter "github.com/json-iterator/go"
"github.com/tidwall/gjson"

"github.com/apache/rocketmq-client-go/v2/errors"
"github.com/apache/rocketmq-client-go/v2/hooks"
"github.com/apache/rocketmq-client-go/v2/internal"
"github.com/apache/rocketmq-client-go/v2/internal/remote"
"github.com/apache/rocketmq-client-go/v2/internal/utils"
Expand Down Expand Up @@ -881,7 +880,7 @@ func (dc *defaultConsumer) processPullResult(mq *primitive.MessageQueue, result

// filter message according to tags
msgListFilterAgain := msgs
if data.Tags.Len() > 0 && data.ClassFilterMode {
if data.Tags.Len() > 0 && !data.ClassFilterMode {
msgListFilterAgain = make([]*primitive.MessageExt, 0)
for _, msg := range msgs {
_, exist := data.Tags.Contains(msg.GetTags())
Expand Down

0 comments on commit c197b50

Please sign in to comment.