You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] mqadmin exportMetadata exits without writing a file in broker-only mode #11613
RocketMQ 5.5.1. Reproduced against develop at 74c2a8e80a5f5ce367ba06daa19fcc187e3416c4. The export command is unchanged at b2fe3266f32e20ec3ff35b57507f52f6cb6cd33c.
JDK Version
OpenJDK 17.
Describe the Bug
mqadmin exportMetadata -b <broker> accepts a broker address and does not require -t or -g. With neither filter set, the command exits with code 0 and leaves the output directory empty. An automated export can therefore report success without a metadata file.
Steps to Reproduce
Start a local NameServer and Broker, and create a user topic and subscription group.
Run the following command against the Broker, using an empty output directory:
sh bin/mqadmin exportMetadata -n 127.0.0.1:9876 -b 127.0.0.1:10911 -f ./metadata-export
Check the exit code and output directory.
What Did You Expect to See?
metadata.json containing the topic and subscription group tables, consistent with the default when exporting by cluster.
What Did You See Instead?
The command exited with code 0. The output directory stayed empty.
Could the broker-only regression test in #11614 also cover a broker that returns no user topics or subscription groups? I'd expect it to still write metadata.json with topicConfigTable and subscriptionGroupTable both set to {}. That would distinguish a successful empty export from the command writing nothing.
Activity
MrKen20 commentedon Nov 25, 2026
Could the broker-only regression test in #11614 also cover a broker that returns no user topics or subscription groups? I'd expect it to still write
metadata.jsonwithtopicConfigTableandsubscriptionGroupTableboth set to{}. That would distinguish a successful empty export from the command writing nothing.