mqtt.json configuration instructions:
A connector configuration is a JSON file that contains information about how to connect to an external MQTT broker, which topics to use when subscribing to data collection, and how to process the data.
broker module
parameter | Defaults | describe |
---|---|---|
name | Default Broker | Agent name for logs and saving to device |
host | localhost | The host name or ip address of the mqtt broker |
port | 1883 | mqtt broker port |
security module
This module configuration provides access information authorized by the mqtt broker client
Three configurations: Basic, Anonymous, Certificates
- Basic:
A basic security configuration via username/password.
parameter | Defaults | describe |
---|---|---|
type | basic | authentication type |
username | username | Username in authentication |
password | password | password in authentication |
Example:
"security": {
"type": "basic",
"username": "username",
"password": "password"
}
- Anonymous:
anonymous authentication method
parameter | Defaults | describe |
---|---|---|
type | anonymous | authentication type |
Example:
"security": {
"type": "anonymous"
}
- Certificates
CA certificate authorization method
parameter | Defaults | describe |
---|---|---|
caCert | /etc/thingsboard-gateway/ca.pem | CA file path |
privateKey | /etc/thingsboard-gateway/privateKey.pem | Private key file path |
cert | /etc/thingsboard-gateway/certificate.pem | Certificate file path |
Example:
"security":{
"caCert": "/etc/thingsboard-gateway/ca.pem",
"privateKey": "/etc/thingsboard-gateway/privateKey.pem",
"cert": "/etc/thingsboard-gateway/certificate.pem"
}