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/08/01 07:44:32 UTC

[GitHub] [rocketmq] francisoliverlee opened a new pull request, #4752: [ISSUE #4749] make topic length , consumer group length configable

francisoliverlee opened a new pull request, #4752:
URL: https://github.com/apache/rocketmq/pull/4752

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   fix https://github.com/apache/rocketmq/issues/4749
   
   ## Brief changelog
   
   XX
   
   ## Verifying this change
   
   XXXX
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


-- 
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] github-actions[bot] commented on pull request #4752: [ISSUE #4749] make topic length , consumer group length configable

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4752:
URL: https://github.com/apache/rocketmq/pull/4752#issuecomment-1701931675

   This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.


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


[GitHub] [rocketmq] ni-ze commented on pull request #4752: [ISSUE #4749] make topic length , consumer group length configable

Posted by GitBox <gi...@apache.org>.
ni-ze commented on PR #4752:
URL: https://github.com/apache/rocketmq/pull/4752#issuecomment-1203402182

   ```java
    void setMaxTopicLength(int maxLength);
       int getMaxTopicLength();
   ```
   IMO,  Put those two method into **ClientConfig** will be better. MQConsumer,LitePullConsumer and MQConsumerInner contains code about send/consume message only.  Set/get config should use ClientConfig.
   
   


-- 
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] github-actions[bot] commented on pull request #4752: [ISSUE #4749] make topic length , consumer group length configable

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #4752:
URL: https://github.com/apache/rocketmq/pull/4752#issuecomment-1705784046

   This PR was closed because it has been inactive for 3 days since being marked as stale.


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


[GitHub] [rocketmq] lizhiboo commented on a diff in pull request #4752: [ISSUE #4749] make topic length , consumer group length configable

Posted by GitBox <gi...@apache.org>.
lizhiboo commented on code in PR #4752:
URL: https://github.com/apache/rocketmq/pull/4752#discussion_r959187712


##########
client/src/main/java/org/apache/rocketmq/client/Validators.java:
##########
@@ -33,8 +33,12 @@
  * Common Validator
  */
 public class Validators {
-    public static final int CHARACTER_MAX_LENGTH = 255;
-    public static final int TOPIC_MAX_LENGTH = 127;
+    public static final int DEFAULT_TOPIC_MAX_LENGTH = 192;
+    public static final int DEFAULT_CONSUMER_GROUP_MAX_LENGTH = 255;
+    // not thread safe
+    public static int consumerGroupMaxLength = DEFAULT_CONSUMER_GROUP_MAX_LENGTH;

Review Comment:
   It seems that  Validators.checkTopic() method only used in MQProducer. it does not harm sendmessageback logic in consume case.



-- 
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] lizhiboo commented on pull request #4752: [ISSUE #4749] make topic length , consumer group length configable

Posted by GitBox <gi...@apache.org>.
lizhiboo commented on PR #4752:
URL: https://github.com/apache/rocketmq/pull/4752#issuecomment-1232502510

   @francisoliverlee following test would not throw exception
   ```java
   AbstractMessingActivityTest.testValidateTopic()
           assertThrows(GrpcProxyException.class, () -> messingActivity.validateTopic(Resource.newBuilder().setName(createString(128)).build()));
   ```
   


-- 
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] guyinyou commented on pull request #4752: [ISSUE #4749] make topic length , consumer group length configable

Posted by GitBox <gi...@apache.org>.
guyinyou commented on PR #4752:
URL: https://github.com/apache/rocketmq/pull/4752#issuecomment-1204694107

   I also think that it is a very good choice to put configuration-related variables in ClientConfig. At the same time, it is necessary to consider how to deal with the inconsistency of the MAX_TOPIC_LENGTH between the producer and the consumer.


-- 
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] YangJodie commented on a diff in pull request #4752: [ISSUE #4749] make topic length , consumer group length configable

Posted by GitBox <gi...@apache.org>.
YangJodie commented on code in PR #4752:
URL: https://github.com/apache/rocketmq/pull/4752#discussion_r951373755


##########
client/src/main/java/org/apache/rocketmq/client/Validators.java:
##########
@@ -33,8 +33,12 @@
  * Common Validator
  */
 public class Validators {
-    public static final int CHARACTER_MAX_LENGTH = 255;
-    public static final int TOPIC_MAX_LENGTH = 127;
+    public static final int DEFAULT_TOPIC_MAX_LENGTH = 192;
+    public static final int DEFAULT_CONSUMER_GROUP_MAX_LENGTH = 255;
+    // not thread safe
+    public static int consumerGroupMaxLength = DEFAULT_CONSUMER_GROUP_MAX_LENGTH;

Review Comment:
   If I actually set this length to 255, the retry topic may be limited by the system topic length. we need reduce the length to safe water.



-- 
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] github-actions[bot] closed pull request #4752: [ISSUE #4749] make topic length , consumer group length configable

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #4752: [ISSUE #4749] make topic length , consumer group length configable
URL: https://github.com/apache/rocketmq/pull/4752


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