diff --git a/broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java b/broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java index 801d886c43be168a4bb37dabbf32d0900f97fe12..1b836ebf4312b418ebc7043a9071f51d5208c16d 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java @@ -178,7 +178,10 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement int maxReconsumeTimes = subscriptionGroupConfig.getRetryMaxTimes(); if (request.getVersion() >= MQVersion.Version.V3_4_9.ordinal()) { - maxReconsumeTimes = requestHeader.getMaxReconsumeTimes(); + Integer times = requestHeader.getMaxReconsumeTimes(); + if (times != null){ + maxReconsumeTimes = times; + } } if (msgExt.getReconsumeTimes() >= maxReconsumeTimes