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/16 08:16:10 UTC

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

xiangwangcheng 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_r358095532
 
 

 ##########
 File path: client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPushConsumerImpl.java
 ##########
 @@ -535,10 +535,12 @@ public void sendMessageBack(MessageExt msg, int delayLevel, final String brokerN
         }
     }
 
-    private int getMaxReconsumeTimes() {
-        // default reconsume times: 16
+    private int getMaxReconsumeTimes(MessageExt messageExt) {
+        if (messageExt.getMaxReConsumerTimes() >= 0) {
+            return messageExt.getMaxReConsumerTimes();
+        }
         if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {
-            return 16;
+            return MixAll.DEFAULT_MAX_RECONSUME_TIMES;
 
 Review comment:
   Same as the comment above.

----------------------------------------------------------------
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