MQTT Broker
The technical documentation of the mqtt-broker microservice,
which forwards MQTT messages between the other microservices.
2 minute read
The MQTT broker in the United Manufacturing Hub is HiveMQ and is customized to fit the needs of the stack. It’s a core component of the stack and is used to communicate between the different microservices.
How it works
The MQTT broker is responsible for receiving MQTT messages from the different microservices and forwarding them to the MQTT Kafka bridge.
Kubernetes resources
- StatefulSet:
united-manufacturing-hub-hivemqce
- Service:
- Internal ClusterIP:
- HiveMQ local:
united-manufacturing-hub-hivemq-local-service
at port 1883 (MQTT) and 8883 (MQTT over TLS) - VerneMQ (for backwards compatibility):
united-manufacturing-hub-vernemq
at port 1883 (MQTT) and 8883 (MQTT over TLS) - VerneMQ local (for backwards compatibility):
united-manufacturing-hub-vernemq-local-service
at port 1883 (MQTT) and 8883 (MQTT over TLS)
- HiveMQ local:
- External LoadBalancer:
united-manufacturing-hub-mqtt
at port 1883 (MQTT) and 8883 (MQTT over TLS)
- Internal ClusterIP:
- ConfigMap:
- Configuration:
united-manufacturing-hub-hivemqce-hive
- Credentials:
united-manufacturing-hub-hivemqce-extension
- Configuration:
- Secret:
united-manufacturing-hub-hivemqce-secret-keystore
- PersistentVolumeClaim:
- Data:
united-manufacturing-hub-hivemqce-claim-data
- Extensions:
united-manufacturing-hub-hivemqce-claim-extensions
- Data:
Configuration
Most of the configuration is done through the XML files in the ConfigMaps. The default configuration should be sufficient for most use cases.
The HiveMQ installation of the United Manufacturing Hub comes with these extensions:
- RBAC file extension to manage the authentication and authorizations rules for the broker.
- Prometheus extension to expose metrics for a prometheus applications
- Heartbeat extension to allow for readiness checks
If you want to add more extensions, or to change the configuration, visit the HiveMQ documentation.
Environment variables
Variable name | Description | Type | Allowed values | Default |
---|---|---|---|---|
HIVEMQ_ALLOW_ALL_CLIENTS | Whether to allow all clients to connect to the broker | bool | true , false | true |
Last modified April 17, 2023: build: version 0.9.13 (6cb0a01)