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 2022/03/11 07:42:15 UTC

[GitHub] [rocketmq-mqtt] ferrirW opened a new issue #19: Confusing why append '/' to the end of topic name?

ferrirW opened a new issue #19:
URL: https://github.com/apache/rocketmq-mqtt/issues/19


   Have not find related explain, please give some description.
   
   https://github.com/apache/rocketmq-mqtt/blob/9939eabad05dced3fb202804de8c3942764986cd/mqtt-common/src/main/java/org/apache/rocketmq/mqtt/common/util/TopicUtils.java#L27-L44


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



[GitHub] [rocketmq-mqtt] ShannonDing closed issue #19: Confusing why append '/' to the end of topic name?

Posted by GitBox <gi...@apache.org>.
ShannonDing closed issue #19:
URL: https://github.com/apache/rocketmq-mqtt/issues/19


   


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



[GitHub] [rocketmq-mqtt] tianliuliu commented on issue #19: Confusing why append '/' to the end of topic name?

Posted by GitBox <gi...@apache.org>.
tianliuliu commented on issue #19:
URL: https://github.com/apache/rocketmq-mqtt/issues/19#issuecomment-1064875004


   ping @pingww 


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



[GitHub] [rocketmq-mqtt] pingww commented on issue #19: Confusing why append '/' to the end of topic name?

Posted by GitBox <gi...@apache.org>.
pingww commented on issue #19:
URL: https://github.com/apache/rocketmq-mqtt/issues/19#issuecomment-1064923907


   The main reason is to format it into a fixed format. As for the addition of a /, the reason is that there is a matching path in the trie, which can indeed be optimized.


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



[GitHub] [rocketmq-mqtt] ferrirW commented on issue #19: Confusing why append '/' to the end of topic name?

Posted by GitBox <gi...@apache.org>.
ferrirW commented on issue #19:
URL: https://github.com/apache/rocketmq-mqtt/issues/19#issuecomment-1065275572


   ok, thanks for answering.
   
   And found some code can be optimized:
   
   1. ADDFLAG & JINFLAG should be replaced with PLUS_SIGN & NUMBER_SIGN refer to unicode
   
   2. Some redundant containsKey before putIfAbsent()
   
   3. buildIntanceName -> buildInstanceName
   
   4.  TopicUtils.isMatch("t/t1/t2/", "t/#/t2/") should be false but return true now.(I know some client will do this check like poho, however, it is better for the server to do a validation as well)


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



[GitHub] [rocketmq-mqtt] pingww commented on issue #19: Confusing why append '/' to the end of topic name?

Posted by GitBox <gi...@apache.org>.
pingww commented on issue #19:
URL: https://github.com/apache/rocketmq-mqtt/issues/19#issuecomment-1067492490


   "t/#/t2/"   is not valid according to the mqtt protocol


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



[GitHub] [rocketmq-mqtt] ferrirW commented on issue #19: Confusing why append '/' to the end of topic name?

Posted by GitBox <gi...@apache.org>.
ferrirW commented on issue #19:
URL: https://github.com/apache/rocketmq-mqtt/issues/19#issuecomment-1067512233


   > "t/#/t2/" is not valid according to the mqtt protocol
   
   yes, I just want to suggest server should do this check anyway, like: https://github.com/apache/rocketmq-mqtt/pull/25#discussion_r825635672


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