ShannonDing commented on code in PR #814:
URL: https://github.com/apache/rocketmq-client-go/pull/814#discussion_r926631677
##########
consumer/consumer.go:
##########
@@ -658,27 +658,28 @@ func (dc *defaultConsumer) updateProcessQueueTable(topic
string, mqs []*primitiv
dc.processQueueTable.Range(func(key, value interface{}) bool {
mq := key.(primitive.MessageQueue)
pq := value.(*processQueue)
- if mq.Topic == topic {
- if !mqSet[mq] {
- pq.WithDropped(true)
- if dc.removeUnnecessaryMessageQueue(&mq, pq) {
- dc.processQueueTable.Delete(key)
- changed = true
- rlog.Debug("remove unnecessary mq when
updateProcessQueueTable", map[string]interface{}{
- rlog.LogKeyConsumerGroup:
dc.consumerGroup,
- rlog.LogKeyMessageQueue:
mq.String(),
- })
- }
- } else if pq.isPullExpired() && dc.cType ==
_PushConsume {
- pq.WithDropped(true)
- if dc.removeUnnecessaryMessageQueue(&mq, pq) {
- dc.processQueueTable.Delete(key)
- changed = true
- rlog.Debug("remove unnecessary mq
because pull was paused, prepare to fix it", map[string]interface{}{
- rlog.LogKeyConsumerGroup:
dc.consumerGroup,
- rlog.LogKeyMessageQueue:
mq.String(),
- })
- }
+ if mq.Topic != topic {
Review Comment:
this should deal with all message queue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]