MQTT Brokers¶
Configure MQTT broker connections for publishing Sparkplug B data.
Screenshot placeholder: List of configured MQTT brokers
What is an MQTT Broker?¶
An MQTT broker is the server that receives data from the gateway and distributes it to subscribers (SCADA systems, historians, analytics platforms).
Common brokers: - HiveMQ - Mosquitto - AWS IoT Core - Azure IoT Hub - EMQX
Adding an MQTT Broker¶
Screenshot placeholder: Add broker configuration form
- Navigate to MQTT → Brokers
- Click Add Broker
- Fill in the configuration:
Basic Settings¶
- Broker Name: Descriptive name (e.g., "Production HiveMQ")
- Server Address: Hostname or IP address
- Port: 1883 (TCP) or 8883 (TLS)
- Client ID: Unique identifier for this gateway
Authentication¶
- Username: MQTT username (if required)
- Password: MQTT password (if required)
- Use TLS: Enable for encrypted connections
Connection Options¶
- Keep Alive: Seconds between keep-alive packets (default: 60)
- Clean Session: Start with clean session (default: true)
-
Auto Reconnect: Automatically reconnect on disconnect (default: true)
-
Click Test Connection to verify
- Click Save
Testing Connection¶
Screenshot placeholder: Connection test showing success
Before saving, test the connection: 1. Click Test Connection button 2. Gateway attempts to connect 3. Result shows success or error
Common errors: - Connection refused: Check IP/port - Authentication failed: Verify username/password - Timeout: Check firewall rules - TLS error: Verify TLS configuration
Broker Status¶
Each broker shows real-time status: - 🟢 Connected: Active connection - 🟡 Connecting: Attempting connection - 🔴 Disconnected: No connection
Broker Redundancy¶
The gateway supports primary and secondary brokers for high availability.
Configure at the Edge Node level: 1. Set Primary Broker 2. Optionally set Secondary Broker 3. Gateway automatically fails over if primary is unavailable
See Broker Redundancy for details.
TLS/SSL Configuration¶
For secure connections:
- Enable Use TLS
- Port typically changes to 8883
- Optionally provide:
- CA Certificate: Verify broker certificate
- Client Certificate: For mutual TLS
- Client Key: Private key for client cert
Best Practices¶
- ✅ Use TLS in production
- ✅ Use strong, unique passwords
- ✅ Configure broker redundancy for critical systems
- ✅ Monitor connection statistics
- ✅ Test failover scenarios