MQTT server parameters
MQTT server parameters
Parameters
-c,--conf_fileconf\_file |
Path to the configuration file |
-v,--verbosity |
ActivateEnable debug mode |
Configuration file (--conf)
[DEFAULT]
;;topic
;; One topic (legacy syntax) or a single-line JSON array with multiple topics
;; topic = testtopic/# (single topic)
;; topic = ["factory/+/temperature","factory/+/humidity"] (multi-topic)
topic = < Topic to subscribe to in order to receive messages. To use more than one, use a single-line JSON array >
;; connection
host = < Host of the server on which the messages will be listened for >
port = < Port of the server on which the messages will be listened for >
;; protocol supports: tcp, websockets, unix
; protocol = < ProtocolType type.of Supportedprotocol. :Accepted: tcp, websockets, unix
; user = < User >
; password = < Password >
; ssl = 0 < Enable ssl encryption >
; trust_ssl = < Certificate verification >
;; Database
; dblocation = < DatabaseLocation of the database file location >
; dbname = < DatabaseName of the database file name >
; data_cleaning_interval = 300 < Data reset period >
; data_cleaning_period = < Data agingAge period of the data to reset >
;; Logs
;; log_name = < LogName of the log file name >
; log_location = < LogPath of the log file path >
; log_level = < Log level >
; max_log_bytes = < Maximum log size >
; log_rotation_count = < Number of log files to be stored after rotation, by default: 3 >
Example
[DEFAULT]
;;topic
topic = testtopic/#
;; topic = ["factory/+/temperature","factory/+/humidity","alerts/#"] (multi-topic)
;; connection
host = test.mosquitto.org
port = 1883
;; protocol supports: tcp, websockets, unix
; protocol = websockets
; user = ro
; password = readonly
; ssl = 0
; trust_ssl = 1
;; Database
dblocation = /opt/pandora/pandora_iot_server/db
dbname = pandora_iot.db
; data_cleaning_interval = 300
; data_cleaning_period = 86400
;; Logs
log_name = pandora_iot.log
log_location = /var/log/pandora/
; log_level = debug
; max_log_bytes = 50_000_000
; log_rotation_count = 3