diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java index e66a9825f3d..0fef8666cb5 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java @@ -653,7 +653,7 @@ private PopResult processPopResult(final PopResult popResult, final Subscription Iterator iterator = msgListFilterAgain.iterator(); while (iterator.hasNext()) { MessageExt msg = iterator.next(); - if (msg.getReconsumeTimes() > defaultMQPushConsumer.getMaxReconsumeTimes()) { + if (msg.getReconsumeTimes() > getMaxReconsumeTimes()) { iterator.remove(); log.info("Reconsume times has reached {}, so ack msg={}", msg.getReconsumeTimes(), msg); }