This is an automated email from the ASF dual-hosted git repository.
lizhimin pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 459d27b39f [ISSUE #10191] Fix wrong option value for namesrvAddr
parsing in timer benchmark examples (#10192)
459d27b39f is described below
commit 459d27b39f699f880e00d613d0b3e86bd05c10f5
Author: majialong <[email protected]>
AuthorDate: Tue Mar 31 15:33:05 2026 +0800
[ISSUE #10191] Fix wrong option value for namesrvAddr parsing in timer
benchmark examples (#10192)
---
.../java/org/apache/rocketmq/example/benchmark/timer/TimerConsumer.java | 2 +-
.../java/org/apache/rocketmq/example/benchmark/timer/TimerProducer.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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 f2ab6b5731..21532cab7e 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 class TimerConsumer {
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 3e92ff1b0b..4a78e6e338 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 class TimerProducer {
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;