How bytebeamio/rumqtt works
Main Components Identification
a) rumqttc (MQTT Client Library)
• Client implementation
• Protocol handlers (v4 and v5)
• Network/TLS layer
• Event loop system
b) rumqttd (MQTT Broker)
• Server implementation
• Router system
• Protocol handlers
• Link management
• Replication system
┌─────────────────────────────────────┐ ┌─────────────────────────────────────┐
• rumqttc │ │ rumqttd │
• ┌─────────────┐ ┌─────────────┐ │ │ ┌─────────────┐ ┌─────────────┐ │
• MQTT v4 │ │ MQTT v5 │ │ │ │ Router │ │ Protocol │ │
• ┘ └─────────────┘ │ │ └─────────────┘ └─────────────┘ │
• ┌─────────────┐ ┌─────────────┐ │ │ ┌─────────────┐ ┌─────────────┐ │
• Event Loop │ │ TLS │ │ │ │ Link │ │ Replicator │ │
• ┘ └─────────────┘ │ │ └─────────────┘ └─────────────┘ │
• ┘ └─────────────────────────────────────┘
Detailed Component Breakdown
For rumqttc:
Client Implementation
• Protocol Handlers (v4/v5)
• Connection Management
• Event Loop
• Transport Layer (TCP/TLS/WebSocket)
For rumqttd:
Broker Implementation
• Router System
• Connection Management
• Message Routing
• Subscription Handling
• Link Management
• Bridges
• Console
• Network
• Protocol Support
• Replication System
Connection Flows
• Client ↔ Broker connections
• Inter-broker communication
• Bridge connections
• WebSocket connections
• TLS handshakes
Additional Elements
Supporting components:
• Configuration management
• Metrics and monitoring
• Authentication/Authorization
• Storage systems for retained messages
Notes for Implementation
• Clear boundaries between client and broker components
• Async nature of the system
• Version support indicators
• Scalability aspects
• MQTT 3.1.1 and 5.0 support
• QoS levels
• TLS security
• WebSocket support
• High performance architecture
• Replication capabilities