Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Requirements

  • Rust 1.70+Install Rust
  • Git — For cloning the repository
# Clone the repository
git clone https://github.com/iliasichinava/mqtt-broker.git
cd mqtt-broker

# Build in release mode
cargo build --release

# The binaries are now in target/release/
ls target/release/mqtt-*

The following binaries will be built:

BinaryDescription
mqtt-brokerThe MQTT broker server
mqtt-producerCLI tool to publish messages
mqtt-consumerCLI tool to subscribe to topics

Install Globally

To install the binaries to your Cargo bin directory (~/.cargo/bin/):

cargo install --path .

Now you can run the commands from anywhere:

mqtt-broker --help
mqtt-producer --help
mqtt-consumer --help

From GitHub Directly

Install directly from the repository without cloning:

cargo install --git https://github.com/iliasichinava/mqtt-broker.git

Verify Installation

# Check broker version/help
mqtt-broker --help

# Expected output:
# MQTT Broker - Production-grade MQTT 3.1.1 broker
# 
# Usage: mqtt-broker [OPTIONS]
# ...

Next Steps

Now that you have mqtt-broker installed, head to the Quick Start guide to run your first pub/sub workflow.