diff --git a/example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerConsumer.java b/example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerConsumer.java index f2ab6b57310..21532cab7e0 100644 --- a/example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerConsumer.java +++ b/example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerConsumer.java @@ -56,7 +56,7 @@ public TimerConsumer(String[] args) { System.exit(-1); } - final String namesrvAddr = commandLine.hasOption('n') ? commandLine.getOptionValue('t').trim() : "localhost:9876"; + final String namesrvAddr = commandLine.hasOption('n') ? commandLine.getOptionValue('n').trim() : "localhost:9876"; topic = commandLine.hasOption('t') ? commandLine.getOptionValue('t').trim() : "BenchmarkTest"; System.out.printf("namesrvAddr: %s, topic: %s%n", namesrvAddr, topic); diff --git a/example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerProducer.java b/example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerProducer.java index 3e92ff1b0be..4a78e6e338f 100644 --- a/example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerProducer.java +++ b/example/src/main/java/org/apache/rocketmq/example/benchmark/timer/TimerProducer.java @@ -74,7 +74,7 @@ public TimerProducer(String[] args) { System.exit(-1); } - final String namesrvAddr = commandLine.hasOption('n') ? commandLine.getOptionValue('t').trim() : "localhost:9876"; + final String namesrvAddr = commandLine.hasOption('n') ? commandLine.getOptionValue('n').trim() : "localhost:9876"; topic = commandLine.hasOption('t') ? commandLine.getOptionValue('t').trim() : "BenchmarkTest"; threadCount = commandLine.hasOption("tc") ? Integer.parseInt(commandLine.getOptionValue("tc")) : 16; messageSize = commandLine.hasOption("ms") ? Integer.parseInt(commandLine.getOptionValue("ms")) : 1024;