You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by di...@apache.org on 2021/01/15 09:57:12 UTC

[rocketmq-client-go] branch master updated: fix possible infinite loop after rebalance (#574)

This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 7e36c75  fix possible infinite loop after rebalance (#574)
7e36c75 is described below

commit 7e36c751e428c781eedf44704a77acd5bd0fe26c
Author: fluyu <fl...@users.noreply.github.com>
AuthorDate: Fri Jan 15 17:57:02 2021 +0800

    fix possible infinite loop after rebalance (#574)
---
 consumer/push_consumer.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/consumer/push_consumer.go b/consumer/push_consumer.go
index 5177fd9..f13d5e2 100644
--- a/consumer/push_consumer.go
+++ b/consumer/push_consumer.go
@@ -465,6 +465,12 @@ func (pc *pushConsumer) pullMessage(request *PullRequest) {
 				return
 			default:
 				pc.submitToConsume(request.pq, request.mq)
+				if request.pq.IsDroppd() {
+					rlog.Info("push consumer quit pullMessage for dropped queue.", map[string]interface{}{
+						rlog.LogKeyConsumerGroup: pc.consumerGroup,
+					})
+					return
+				}
 			}
 		}
 	})