Skip to main content

MQTT server parameters

Parameters

-c,--conf_file Path to configuration file
-v,--verbosity Activate debug mode
Configuration file (--conf)
[DEFAULT]
;;topic
topic = < Topic to subscribe to receive messages. >

;; connection
host = < Host of the server on which messages will be listened >
port = < Port of the server on which messages will be listened >
;; protocol supports: tcp, websockets, unix
; protocol = < Protocol type. Supported : tcp, websockets, unix
; user = < User >
; password = < Password >
; ssl = 0 < Enable ssl encryption >
; trust_ssl = < Certificate verification >

;; Database
; dblocation = < Database file location >
; dbname = < Database file name >
; data_cleaning_interval = 300 < Data reset period >
; data_cleaning_period = < Data aging period to reset> 

;; Logs
;; log_name = < Log file name > 
; log_location = < 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/#

;; 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