Skip to content

Latest commit

ย 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

README.md

The Rust Implementation of Apache RocketMQ Name server

Overview

Here is the rust implementation of the name server for Apache RocketMQ.

Getting Started

Requirements

  1. rust toolchain MSRV is 1.75.(stable,nightly)

Run name server

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 version

Usage Examples

Start with default configuration:

cargo run --bin rocketmq-namesrv-rust

Start with configuration file:

cargo run --bin rocketmq-namesrv-rust -- -c /path/to/namesrv.toml

Print all configuration items:

cargo run --bin rocketmq-namesrv-rust -- -p

Override specific parameters:

cargo run --bin rocketmq-namesrv-rust -- --listenPort 19876 --bindAddress 127.0.0.1

Combined usage (config file + overrides):

cargo run --bin rocketmq-namesrv-rust -- -c config.toml --listenPort 19876 --rocketmqHome /opt/rocketmq

Configuration Priority

Configuration values are applied in the following order (later values override earlier ones):

  1. Default values
  2. Configuration file (specified with -c)
  3. Command line arguments

Testing

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.sh

Feature

Feature 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 ๐Ÿ’” โŒ