A high-performance, asynchronous MQTT broker implementation written in Rust. Ingress-Engine is designed for efficient message brokering with support for concurrent client connections and configurable network settings.
- Asynchronous Networking: Built on Tokio for non-blocking I/O and high concurrency
- MQTT Protocol Support: Full MQTT broker implementation
- Configurable: Easy-to-customize settings via TOML configuration
- High Performance: Optimized for handling thousands of concurrent connections
- Logging: Integrated logging via
env_logger
- Rust 1.70 or later (edition 2021)
- Cargo
Clone the repository:
git clone <repository-url>
cd Ingress-EngineBuild the project:
cargo build --releaseConfiguration is managed through config.toml. Key settings include:
max_connections: Maximum number of concurrent client connections (default: 1024)tcp_recv_buf_size: Size of TCP receive buffer in bytes (default: 4096)tcp_nodelay: Disable Nagle's algorithm for lower latency (default: true)
cargo run --releaseThe server will start on the default address 0.0.0.0:1883 (standard MQTT port).
Set the BIND_ADDR environment variable to use a different address:
BIND_ADDR=127.0.0.1:9999 cargo runControl logging level with the RUST_LOG environment variable:
RUST_LOG=debug cargo runsrc/main.rs- Application entry pointsrc/lib.rs- Library module definitionssrc/network.rs- Network connector and broker implementationsrc/server.rs- Server logicsrc/connection.rs- Connection handlingsrc/async_conn.rs- Asynchronous connection utilitiessrc/config.rs- Configuration managementexamples/attack.rs- Example or test client
tokio- Asynchronous runtimeserde- Serialization frameworktoml- TOML parsing for configurationlog&env_logger- Logging infrastructurebytes- Efficient byte handlingthiserror- Error handling utilities
An example attack/test client is provided in examples/attack.rs.
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.