|
VLink
2.0.0
A high-performance communication middleware
|
Transport configuration for the mqtt:// MQTT broker bridge.
More...
Go to the source code of this file.
Transport configuration for the mqtt:// MQTT broker bridge.
MqttConf binds the mqtt:// URL scheme to the Eclipse Paho MQTT C client. MQTT is a lightweight publish/subscribe protocol designed for constrained devices, intermittent links, and low-bandwidth wide-area networks; it always routes through a broker (no peer-to-peer mode). Use this transport to bridge VLink topics to a cloud / fleet MQTT broker, or to interoperate with existing MQTT-based telemetry pipelines.
| Publisher | Subscriber | Server | Client | Getter | Setter |
|---|---|---|---|---|---|
| yes | yes | yes | yes | yes | yes |
| Component | Description |
|---|---|
address | MQTT topic path (URL host concatenated with path) |
event | Optional secondary event filter (?event=) |
domain | Domain / namespace identifier (?domain=); factory default applied |
qos | MQTT QoS level 0, 1 or 2 (?qos=); factory default applied |
fragment | Optional broker URI override carried in the URL fragment |
| Property | Source | Description |
|---|---|---|
| Broker URI | VLINK_MQTT_BROKER env var | tcp:// / ssl:// / ws:// URI |
| Domain ID | VLINK_MQTT_DOMAIN env var | Default ?domain= when absent |
| QoS level | VLINK_MQTT_QOS env var | Default 0, 1 or 2 |
| Keep-alive (s) | VLINK_MQTT_KEEPALIVE env | MQTT keep-alive interval |
| Client ID prefix | VLINK_MQTT_CLIENT_ID env | Prefix used for generated client IDs |
| Property | Description |
|---|---|
ssl:// URI scheme | Selects TLS transport instead of plain TCP |
| CA certificate file | Configured through set_property("mqtt.ca_file", path) |
| Client certificate | Configured through set_property("mqtt.cert_file", path) |
| Client private key | Configured through set_property("mqtt.key_file", path) |
| Username / password | Set via mqtt.username and mqtt.password properties |
VLINK_SUPPORT_MQTT is defined. MqttFactory::get_default_domain_id() and MqttFactory::get_default_qos() when domain or qos are omitted; direct construction defaults remain domain=0 and qos=1. is_valid() returns false when address is empty, domain is negative, or qos is outside [0, 2].