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 2021/12/08 09:32:49 UTC

[GitHub] [rocketmq] shuangchengsun commented on a change in pull request #3594: [ISSUE 3585] [Part F] eliminate regex match in topic/group name check

shuangchengsun commented on a change in pull request #3594:
URL: https://github.com/apache/rocketmq/pull/3594#discussion_r764691843



##########
File path: common/src/main/java/org/apache/rocketmq/common/topic/TopicValidator.java
##########
@@ -62,14 +58,39 @@
         SYSTEM_TOPIC_SET.add(RMQ_SYS_OFFSET_MOVED_EVENT);
 
         NOT_ALLOWED_SEND_TOPIC_SET.add(RMQ_SYS_SCHEDULE_TOPIC);
+
+        // regex: ^[%|a-zA-Z0-9_-]+$
+        // %
+        VALID_CHAR_BIT_MAP['%'] = true;
+        // -
+        VALID_CHAR_BIT_MAP['-'] = true;
+        // _
+        VALID_CHAR_BIT_MAP['_'] = true;

Review comment:
       oh it's my fault, I used to think it was a separator. I have fixed it. 




-- 
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: dev-unsubscribe@rocketmq.apache.org

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