Skip to content

MQTT Bridge Component

The MQTT bridge component extends the Bus across multiple nodes.

Subscribed topics on one node are published using an MQTT client to republish on the Bus present on another node.

MQTT Bridge Configuration Variables

The following table describes the configuration variables that can be used with the MQTT bridge component:

Parameter Type Description Valid Values Required Y/N
Bus String The name of the Bus component to use The name of an existing Bus component Y
Logger String The name of the Logger component to use The name of an existing Logger component N
QueueSize Unsigned Integer The size of the queue for the subscriber to hold messages Default: 4 N
Cookie Integer The cookie value for the subscriber A valid cookie N
Patterns Array of Strings Array of patterns to match on the Bus component for subscription Y
MQTTPatterns Array of Strings Array of patterns to match for MQTT subscription Pattern, or patterns, to match Y
MQTTConfig Object MQTT Client Configuration See MQTT Client Configuration Variables in the MQTT Exporter Component section Y

MQTT Bridge Configuration Example

The following example configures an MQTT bridge component:

"Patterns": ["test/data"],
"MQTTPatterns": ["mqtt/request"],
"MQTTConfig":
{
  "ServerURI": "tcp://127.0.0.1:1883",
  "ClientID": "mqtt_bridge",
  "MQTTInstance": 0,
  "QoS": 1,
  "ClientConfig":
  {
    "KeepAliveInterval": 0,
    "Reliable": true,
    "Username": "test",
    "Password": "test",
    "ConnectTimeout": 0,
    "MQTTVersion": 4,
    "CleanSession": false,
    "CleanStart": false,
    "RetryCount": 6,
    "RetryInterval": 5,
    "SSLConfig":
    {
      "EnableServerCertAuth": true,
      "SSLVersion": 3,
      "TrustStore": "roots.pem",
      "KeyStore": "public_key.pem",
      "PrivateKey": "PEM format - private_key.pem",
      "EnabledCipherSuites": "ALL",
      "PrivateKeyPasswd": " "
    }
  }
}
Back to top