Here is the rust implementation of the name server for Apache RocketMQ.
- rust toolchain MSRV is 1.75.(stable,nightly)
Run the following command to see usage๏ผ
cargo run --bin rocketmq-namesrv-rust -- --help
Apache RocketMQ Name Server - Rust implementation providing lightweight service discovery and routing
Usage: rocketmq-namesrv-rust [OPTIONS]
Options:
-c, --configFile <FILE>
Name server config properties file
-p, --printConfigItem
Print all config items and exit
--listenPort <PORT>
Name server listen port (default: 9876)
--bindAddress <ADDRESS>
Name server bind address (default: 0.0.0.0)
--rocketmqHome <PATH>
RocketMQ home directory
--kvConfigPath <PATH>
KV config file path
-h, --help
Print help (see a summary with '-h')
-V, --version
Print versionStart with default configuration:
cargo run --bin rocketmq-namesrv-rustStart with configuration file:
cargo run --bin rocketmq-namesrv-rust -- -c /path/to/namesrv.tomlPrint all configuration items:
cargo run --bin rocketmq-namesrv-rust -- -pOverride specific parameters:
cargo run --bin rocketmq-namesrv-rust -- --listenPort 19876 --bindAddress 127.0.0.1Combined usage (config file + overrides):
cargo run --bin rocketmq-namesrv-rust -- -c config.toml --listenPort 19876 --rocketmqHome /opt/rocketmqConfiguration values are applied in the following order (later values override earlier ones):
- Default values
- Configuration file (specified with
-c) - Command line arguments
Run the feature test script to validate the parameter parsing:
# Windows
.\scripts\test_namesrv_features.ps1
# Linux/Mac
chmod +x scripts/test_namesrv_features.sh
./scripts/test_namesrv_features.shFeature list:
-
Not support: ๐ โ
-
Base support: โค๏ธ โ
-
Perfect support: ๐ โ
| Feature | request code | Support | remark |
|---|---|---|---|
| Put KV Config | 100 | ๐ โ | |
| Get KV Config | 101 | ๐ โ | |
| Delete KV Config | 102 | ๐ โ | |
| Get kv list by namespace | 219 | ๐ โ | |
| Query Data Version | 322 | ๐ โ | |
| Register Broker | 103 | ๐ โ | |
| Unregister Broker | 104 | ๐ โ | |
| Broker Heartbeat | 904 | ๐ โ | |
| Get broker member_group | 901 | ๐ โ | |
| Get broker cluster info | 106 | ๐ โ | |
| Wipe write perm of boker | 205 | ๐ โ | |
| Add write perm of brober | 327 | ๐ โ | |
| Get all topic list from name server | 206 | ๐ โ | |
| Delete topic in name server | 216 | ๐ โ | |
| Register topic in name server | 217 | ๐ โ | |
| Get topics by cluster | 224 | ๐ โ | |
| Get system topic list from name server | 304 | ๐ โ | |
| Get unit topic list | 311 | ๐ โ | |
| Get has unit sub topic list | 312 | ๐ โ | |
| Get has unit sub ununit topic list | 313 | ๐ โ | |
| Update name server config | 318 | ๐ โ | |
| Get name server config | 319 | ๐ โ |