mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-19 10:54:54 +08:00
[benchmark] Add clientRebalanceEnable
Signed-off-by: zhangyang21 <zhangyang21@xiaomi.com>
This commit is contained in:
@@ -64,6 +64,7 @@ public class Consumer {
|
||||
final double failRate = commandLine.hasOption('r') ? Double.parseDouble(commandLine.getOptionValue('r').trim()) : 0.0;
|
||||
final boolean msgTraceEnable = commandLine.hasOption('m') && Boolean.parseBoolean(commandLine.getOptionValue('m'));
|
||||
final boolean aclEnable = commandLine.hasOption('a') && Boolean.parseBoolean(commandLine.getOptionValue('a'));
|
||||
final boolean clientRebalanceEnable = commandLine.hasOption('c') ? Boolean.parseBoolean(commandLine.getOptionValue('c')) : true;
|
||||
|
||||
String group = groupPrefix;
|
||||
if (Boolean.parseBoolean(isSuffixEnable)) {
|
||||
@@ -132,6 +133,7 @@ public class Consumer {
|
||||
consumer.setConsumeThreadMin(threadCount);
|
||||
consumer.setConsumeThreadMax(threadCount);
|
||||
consumer.setInstanceName(Long.toString(System.currentTimeMillis()));
|
||||
consumer.setClientRebalance(clientRebalanceEnable);
|
||||
|
||||
if (filterType == null || expression == null) {
|
||||
consumer.subscribe(topic, "*");
|
||||
@@ -218,6 +220,10 @@ public class Consumer {
|
||||
opt.setRequired(false);
|
||||
options.addOption(opt);
|
||||
|
||||
opt = new Option("c", "clientRebalanceEnable", true, "Client Rebalance Enable, Default: true");
|
||||
opt.setRequired(false);
|
||||
options.addOption(opt);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user