diff --git a/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java b/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java index 0a1d214b87f4288cf97e2fd3d76a37e28dd04d50..97ca51d966d38b18bfdfb430c707a093b2e41a42 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java @@ -116,6 +116,7 @@ import org.apache.rocketmq.remoting.netty.NettyRequestProcessor; import org.apache.rocketmq.remoting.protocol.LanguageCode; import org.apache.rocketmq.remoting.protocol.RemotingCommand; import org.apache.rocketmq.remoting.protocol.RemotingSerializable; +import org.apache.rocketmq.remoting.protocol.RemotingSysResponseCode; import org.apache.rocketmq.store.ConsumeQueue; import org.apache.rocketmq.store.ConsumeQueueExt; import org.apache.rocketmq.store.DefaultMessageStore; @@ -235,10 +236,8 @@ public class AdminBrokerProcessor extends AsyncNettyRequestProcessor implements case RequestCode.GET_BROKER_CLUSTER_ACL_CONFIG: return getBrokerClusterAclConfig(ctx, request); default: - break; + return getUnknownCmdResponse(ctx, request); } - - return null; } @Override @@ -459,6 +458,13 @@ public class AdminBrokerProcessor extends AsyncNettyRequestProcessor implements return null; } + private RemotingCommand getUnknownCmdResponse(ChannelHandlerContext ctx, RemotingCommand request) { + String error = " request type " + request.getCode() + " not supported"; + final RemotingCommand response = + RemotingCommand.createResponseCommand(RemotingSysResponseCode.REQUEST_CODE_NOT_SUPPORTED, error); + return response; + } + private RemotingCommand getAllTopicConfig(ChannelHandlerContext ctx, RemotingCommand request) { final RemotingCommand response = RemotingCommand.createResponseCommand(GetAllTopicConfigResponseHeader.class); // final GetAllTopicConfigResponseHeader responseHeader = diff --git a/example/src/main/java/org/apache/rocketmq/example/benchmark/Consumer.java b/example/src/main/java/org/apache/rocketmq/example/benchmark/Consumer.java index 8a6429b2aa20ea00d5e7e51eb8824163e042d141..d3ac36c2046042090bc6bac1f08ce306810bb846 100644 --- a/example/src/main/java/org/apache/rocketmq/example/benchmark/Consumer.java +++ b/example/src/main/java/org/apache/rocketmq/example/benchmark/Consumer.java @@ -189,8 +189,7 @@ public class Consumer { opt = new Option("g", "group", true, "Consumer group name, Default: benchmark_consumer"); opt.setRequired(false); options.addOption(opt); - - opt = new Option("p", "group suffix enable", true, "Consumer group suffix enable, Default: false"); + opt = new Option("p", "group prefix enable", true, "Is group prefix enable, Default: false"); opt.setRequired(false); options.addOption(opt); diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java index 8570b2f7586e80b31af821e5a07313b5deb0c979..d82453dc9ff72d031dcbb2fcbc561da9b27fe9bb 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/acl/DeleteAccessConfigSubCommand.java @@ -44,10 +44,10 @@ public class DeleteAccessConfigSubCommand implements SubCommand { public Options buildCommandlineOptions(Options options) { OptionGroup optionGroup = new OptionGroup(); - Option opt = new Option("b", "brokerAddr", true, "delete acl config account to which broker"); + Option opt = new Option("b", "brokerAddr", true, "delete acl config account from which broker"); optionGroup.addOption(opt); - opt = new Option("c", "clusterName", true, "delete cl config account to which cluster"); + opt = new Option("c", "clusterName", true, "delete acl config account from which cluster"); optionGroup.addOption(opt); optionGroup.setRequired(true); @@ -76,7 +76,7 @@ public class DeleteAccessConfigSubCommand implements SubCommand { defaultMQAdminExt.start(); defaultMQAdminExt.deletePlainAccessConfig(addr, accessKey); - System.out.printf("delete plain access config account to %s success.%n", addr); + System.out.printf("delete plain access config account from %s success.%n", addr); System.out.printf("account's accesskey is:%s", accessKey); return; @@ -89,7 +89,7 @@ public class DeleteAccessConfigSubCommand implements SubCommand { CommandUtil.fetchMasterAddrByClusterName(defaultMQAdminExt, clusterName); for (String addr : masterSet) { defaultMQAdminExt.deletePlainAccessConfig(addr, accessKey); - System.out.printf("delete plain access config account to %s success.%n", addr); + System.out.printf("delete plain access config account from %s success.%n", addr); } System.out.printf("account's accesskey is:%s", accessKey); diff --git a/tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java b/tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java index 10241bf91e1970afd04c46b568cf6d4e645fbb52..b625cd94c18c89bf048d98c45da926d17905e634 100644 --- a/tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java +++ b/tools/src/main/java/org/apache/rocketmq/tools/command/acl/UpdateAccessConfigSubCommand.java @@ -50,7 +50,7 @@ public class UpdateAccessConfigSubCommand implements SubCommand { Option opt = new Option("b", "brokerAddr", true, "update acl config file to which broker"); optionGroup.addOption(opt); - opt = new Option("c", "clusterName", true, "update cl config file to which cluster"); + opt = new Option("c", "clusterName", true, "update acl config file to which cluster"); optionGroup.addOption(opt); optionGroup.setRequired(true);