Skip to content

Running with Cargo ​

The workspace currently runs RobustMQ as one broker binary. The old meta-service, mqtt-server, and journal-server Cargo commands are no longer part of the cmd package.

Standalone broker ​

From the repository root:

bash
make run

This is equivalent to running the broker binary directly:

bash
cargo run --package cmd --bin broker-server -- --conf=config/server.toml

The checked-in config/server.toml is a single-node configuration. It uses the meta, broker, and engine roles and stores data under ./data.

The broker listens on these default local ports:

ServicePort
MQTT1883
MQTT TLS1885
MQTT WebSocket8083
Kafka9092
AMQP5672
NATS4222
Storage engine1779
Admin HTTP API58080
gRPC1228

Verify ​

In another terminal:

bash
curl -i http://127.0.0.1:58080/health/node
curl http://127.0.0.1:58080/metrics | head

For a real MQTT round trip, use MQTTX in two terminals:

bash
mqttx sub -h 127.0.0.1 -p 1883 -u admin -P robustmq -t "test/topic"
mqttx pub -h 127.0.0.1 -p 1883 -u admin -P robustmq \
  -t "test/topic" -m "Hello RobustMQ!"

Build only ​

bash
cargo build --package cmd --bin broker-server

To run a different configuration, pass its path after --conf, for example:

bash
cargo run --package cmd --bin broker-server -- \
  --conf=config/cluster/server-1.toml
🎉 既然都登录了 GitHub,不如顺手给我们点个 Star 吧!⭐ 你的支持是我们最大的动力 🚀