In TDM Edge Gateway Reference Architecture the Edge Dispatcher is the micro-service in charge of collecting the data sent by sensor and station handlers to the internal broker and forward them as messages to the remote TDM Cloud.
It carries out the task of:
- decouple data production from data transmission in order to temporarily store, compress and send data at intervals that can be configured according to network capabilities;
- present the credentials for remote cloud accessing and transmission;
- manage locally any interruptions or deteriorations of the communications.
Settings are retrieved from both configuration file and command line. Values are applied in the following order, the last overwriting the previous:
- configuration file section 'GENERAL' for the common options (logging, local MQTT broker...);
- configuration file section 'EDGE_dispatcher' for both common and specific options;
- command line options.
-
mqtt_local_host
hostname or address of the local broker (default: localhost)
-
mqtt_local_port
port of the local broker (default: 1883)
The options mqtt_host and mqtt_port now are deprecated and no longer recognized. mqtt_local_host and mqtt_local_port must be used instead.
-
mqtt_remote_host
hostname or address of the remote broker (default: )
-
mqtt_remote_port
port of the remote broker (default: 8883)
-
mqtt_remote_tls
remote broker uses TLS (default: True)
-
mqtt_remote_cafile
path of the trusted CA certificates file for the remote broker (default: /etc/ssl/cert.pem)
-
mqtt_remote_certfile
path of the cert file for the remote broker (UNUSED, RESERVED)
-
mqtt_remote_keyfile
path of the key file for the remote broker (UNUSED, RESERVED)
-
mqtt_remote_user
username to use for the remote broker (default: the edge id)
-
mqtt_remote_pass
password to use for the remote broker
-
mqtt_remote_secret
password to use for the remote broker in Docker Secret
-
logging_level
threshold level for log messages (default: 20)
When a settings is present both in the GENERAL and application specific section, the application specific is applied to the specific handler.
- mqtt_local_host
- mqtt_local_port
- logging_level
In this example, the logging_level settings is overwritten to 1 only for this handler, while other handlers use 0 from the section GENERAL:
[GENERAL]
logging_level = 0
[EDGE_dispatcher]
mqtt_local_host = mosquitto
mqtt_local_port = 1883
mqtt_remote_host = broker.example.com
mqtt_remote_port = 8883
logging_level = 1
-
-h, --help
shows the help message and exit
-
-c FILE, --config-file FILE
specifies the path of the configuration file
-
-l LOGGING_LEVEL, --logging-level LOGGING_LEVEL
threshold level for log messages (default: 20)
-
--local-broker MQTT_LOCAL_HOST
hostname or address of the local broker (default: localhost)
-
--local-port MQTT_LOCAL_PORT
port of the local broker (default: 1883)
-
--remote-broker MQTT_REMOTE_HOST
hostname or address of the remote broker (default: )
-
--remote-port MQTT_REMOTE_PORT
port of the remote broker (default: 8883)
-
--remote-tls MQTT_REMOTE_TLS
remote broker uses TLS (default: True)
-
--remote-cafile MQTT_REMOTE_CAFILE
path of the trusted CA certificates file for the remote broker (default: /etc/ssl/cert.pem)
-
--remote-certfile MQTT_REMOTE_CERTFILE
path of the cert file for the remote broker (UNUSED, RESERVED)
-
--remote-keyfile MQTT_REMOTE_KEYFILE
path of the key file for the remote broker (UNUSED, RESERVED)
-
--remote-user MQTT_REMOTE_USER
username to use for the remote broker (default: the edge id)
-
--remote-pass MQTT_REMOTE_PASS
password to use for the remote broker
-
--remote-secret MQTT_REMOTE_SECRET
password to use for the remote broker in Docker Secret
-
--edge-id EDGE_ID
id of the edge gateway (default: the board serial number)