Baetyl-remote-mqtt Configuration
Last Updated:2020-08-18
By default, the module reads configuration file from the etc/baetyl working directory, and the configuration file format is interpreted as follows:
hub:
clientid: Client ID of Client connection Hub. It should not be empty when cleansession is false.
address: [Must] Address of Client connection Hub.
username: [Must] User name of Client connection Hub.
password:If you use account password, you must fill out the password of Client connection Hub, outherwise you do not need to fill out it.
ca: If certificate two-way authentication is adopted, the CA certificate path of Client connection Hub should be filled out.
key: If certificate two-way authentication is adopted, the client private key path of Client connection Hub should be filled out.
cert: If certificate two-way authentication is adopted, the client public key path of Client connection Hub should be filled out.
timeout: Default value: 30s, Time-out period of Client connection Hub
interval: Default value: 1m, Maximum interval time for reconnection of Client connection Hub, increasing to the maximum value from 500 microseconds by doubling.
keepalive: Default value: 1m, Holding time of Client connection Hub
cleansession:Default value: false, Session persistence of Client connection Hub or not.
validatesubs: Default value: false, Client checks Hub subscription result or not; exit after reporting of error in case of subscription failure discovered.
buffersize: Default value: 10, Size of memory queue for Client to send messages to Hub; message loss can be caused by abnormal exit, and the messages with QoS = 1 will depend on Hub to resend.
rules:Routing rule list, subscribing messages from Hub and sending to Remote, or vice versa.
- hub:
clientid: Client ID of Client connection Hub
subscriptions:Message subscribed by Client from Hub, for example
- topic: say
qos: 1
- topic: hi
qos: 0
remote:
name: [Must] Appoint the Remote name, which shall be included in the Remote list.
clientid: Client ID of Client connection Remote
subscriptions:Message subscribed by Client from Hub, for example
- topic: remote/say
qos: 0
- topic: remote/hi
qos: 0
remotes: Remote list
- name: [Must]Remote name, which must be the unique in the list
clientid: Client ID of Client connection Remote
address: [Must] Address of Client connection Remote
username: User name of Client connection Remote
password: If you use account password, you must fill out the password of Client connection Hub, otherwise you do not need to fill out it.
ca: If certificate two-way authentication is adopted, the CA certificate path of Client connection Remote should be filled out.
key: If certificate two-way authentication is adopted, the client private key path of Client connection Remote should be filled out.
cert: If certificate two-way authentication is adopted, the client public key path of Client connection Remote should be filled out.
timeout: Default value: 30s, Time-out period of Client connection Remote.
interval: Default value: 1m, Maximum interval time for reconnection of Client connection Remote, increasing to the maximum value from 500 microseconds by doubling.
keepalive: Default value: 1m, Holding time of Client connection Remote.
cleansession: Default value: false, Session persistence of Client connection Remote or not.
validatesubs: Default value: false, Client checks Remote subscription result or not; exit after reporting of error in case of subscription failure discovered.
buffersize: Default value: 10, Size of memory queue for Client to send messages to Remote; message loss can be caused by abnormal exit, and the messages with QoS = 1 should depend on Remote to resend.
logger: Log configuration item
path: It is empty by default, i.e., no file is printed; if a file is appointed, it will be output to file.
level: Default value: Info, log level, supporting debug, info, warn and error.
format: Default value: Text, log print format, supporting text and json
age:
max: Default value: 15, Maximum number of days a log file is retained
size:
max: Default value: 50, Log file size limit, unit MB
backup:
max: Default value: 15, Maximum number of log files retained