YuShanMuGong commented on a change in pull request #1570: [ISSUE #1561]support 
specify msg level reconsume times
URL: https://github.com/apache/rocketmq/pull/1570#discussion_r360685813
 
 

 ##########
 File path: 
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java
 ##########
 @@ -335,10 +335,12 @@ public ConsumerStatsManager getConsumerStatsManager() {
         return this.defaultMQPushConsumerImpl.getConsumerStatsManager();
     }
 
-    private int getMaxReconsumeTimes() {
-        // default reconsume times: Integer.MAX_VALUE
+    private int getMaxReconsumeTimes(MessageExt messageExt) {
+        if (messageExt.getMaxReConsumerTimes() >= 0) {
+            return messageExt.getMaxReConsumerTimes();
+        }
         if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {
-            return Integer.MAX_VALUE;
+            return MixAll.DEFAULT_MAX_RECONSUME_TIMES;
 
 Review comment:
   I think so

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to