You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/12/22 06:49:05 UTC

[GitHub] [rocketmq] YuShanMuGong commented on a change in pull request #1570: [ISSUE #1561]support specify msg level reconsume times

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:
users@infra.apache.org


With regards,
Apache Git Services