Wiedbol opened a new issue, #11565: URL: https://github.com/apache/rocketmq/issues/11565
**Environment** Windows x64, JDK 22.0.2, RocketMQ 5.5.1 development source. The same command implementation is present in upstream `develop` at `8c3659846`. [Source](https://github.com/apache/rocketmq/blob/8c36598462243aa2da599888388eb154d33abc46/tools/src/main/java/org/apache/rocketmq/tools/command/message/SendMessageCommand.java#L107-L135) **Describe the bug** The help text describes `--broker` as selecting the target broker. When `--broker` is supplied without `--qid`, `mqadmin sendMessage` accepts the command and uses the topic’s default routing. If multiple brokers serve the topic, the message can be routed to a different broker. **Steps to reproduce** On a test cluster where `DemoTopic` is writable on multiple brokers, run this command, replacing the NameServer address and broker name as needed. ```shell mqadmin sendMessage -n 127.0.0.1:9876 -t DemoTopic -p hello -b broker-a ``` **Expected behavior** Reject the incomplete target before sending and explain that `--broker` and `--qid` must be provided together. **Actual behavior** With `-b broker-a` alone, the command calls `producer.send(msg)` without reporting a missing queue ID. Adding `-i 0` selects queue `0` on `broker-a`. I verified both code paths using a mock producer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
