-
Notifications
You must be signed in to change notification settings - Fork 12k
[ROCKETMQ-266] Add a specific Exception message for comparing consumerThreadMax and consumerThreadMin #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1 similar comment
|
Thanks for your contributions. But,
|
2 similar comments
|
@vsair |
|
While consumeThreadMin is specified by a range,why not add consumeThreadMax to a range too? |
|
@lindzh If the two configurations have to be used at the same time, we should combine them to one configure option. |
| public void checkConfigTest() throws Exception { | ||
| DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("test_consumer_group"); | ||
|
|
||
| consumer.setConsumeThreadMax(10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the unit test , we should specify the min explicitly as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test case’s purpose is: If the consumeThreadMax is less than consumeThreadMin, we should get a proper exception message, the one line is enough.
The DefaultMQPushConsumerImpl.java class needs a lot more test case, a lot of condition should be checked, but that’s not this PR’s purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mark800 , I think we should make it more explict since the default max core size may be changed in the future, make it explicit will be clearer.
Besides, in you current unit test, you are only verifying an expcetion is thrown which is not enough to verify this pr since an exception has been thrown even though you don't submit the changes, you should also very the error message is as expected.
|
@Jaskey |
1 similar comment
|
The travis-ci's error log is : It seems it is not the code's problem |
1 similar comment
|
LGTM @zhouxinyu @vongosling any view? |
…rThreadMax and consumerThreadMin (apache#147) * Can’t start consumer with a small consumerThreadMax number * Can’t start consumer with a small consumerThreadMax number * test case for ROCKETMQ-266 * Can’t start consumer with a small consumerThreadMax number * Can’t start consumer with a small consumerThreadMax number * fix merge conflict * update test case for ROCKETMQ-266 * for ROCKETMQ-266 * Trigger rebuild * Trigger rebuild * Trigger rebuild
…rThreadMax and consumerThreadMin (apache#147) * Can’t start consumer with a small consumerThreadMax number * Can’t start consumer with a small consumerThreadMax number * test case for ROCKETMQ-266 * Can’t start consumer with a small consumerThreadMax number * Can’t start consumer with a small consumerThreadMax number * fix merge conflict * update test case for ROCKETMQ-266 * for ROCKETMQ-266 * Trigger rebuild * Trigger rebuild * Trigger rebuild
When the client set the consumerThreadMax to a value less than the default value(20),
we get the “consumeThreadMin Out of range [1, 1000] “ Exception, which is hard to understand.
JIRA Issue: https://issues.apache.org/jira/browse/ROCKETMQ-266