You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ferrirW (via GitHub)" <gi...@apache.org> on 2023/07/05 12:13:56 UTC

[GitHub] [rocketmq] ferrirW commented on a diff in pull request #6988: [ISSUE #6987]feat:Add LMQ quantity check

ferrirW commented on code in PR #6988:
URL: https://github.com/apache/rocketmq/pull/6988#discussion_r1253013906


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -529,6 +529,13 @@ private synchronized RemotingCommand deleteTopic(ChannelHandlerContext ctx,
             }
         }
 
+        if (MixAll.isLmq(topic)) {

Review Comment:
   asynchronously delete is better



##########
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:
##########
@@ -545,6 +545,20 @@ public void destroyLogics() {
         this.consumeQueueStore.destroy();
     }
 
+    private PutMessageStatus checkLmqMessage(MessageExtBrokerInner msg) {
+        if (msg.getProperties() != null
+            && StringUtils.isNotBlank(msg.getProperty(MessageConst.PROPERTY_INNER_MULTI_DISPATCH))
+            && this.isLmqConsumeQueueNumExceeded()) {
+            return PutMessageStatus.LMQ_CONSUME_QUEUE_NUM_EXCEEDED;
+        }
+        return PutMessageStatus.PUT_OK;
+    }
+
+    private boolean isLmqConsumeQueueNumExceeded() {

Review Comment:
   IMO, you should split two patches:
   1. add delete cq logic
   2. limit queue number



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

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org