Link Search Menu Expand Document Edit GitHub

Default Properties


MQTT CLI uses some default values which can be overwritten. MQTT CLI stores the default values in a properties file which is located under the user home directory of your OS under $HOME/.mqtt-cli/config.properties.

On the first successful execution of the CLI this file will be generated and will look like the following example:

mqtt.host=localhost
mqtt.port=1883
mqtt.version=5
client.id.prefix=mqtt
ws.path=/mqtt
client.id.length=8
logfile.level=debug
logfile.path=/Users/tseeberg/.mqtt-cli/logs/

A properties file lists all the properties as key-value pairs. Therefore, you have to specify the values to the following keys if you want to overwrite the given default values.

KeyExplanationDefault
mqtt.hostThe address of the broker which the client will connect to.localhost
mqtt.portThe port of the broker which the client will connect to.1883
mqtt.versionThe mqtt version which the client will use.5
client.id.prefixThe client prefix which will be prepended to the randomly generated client names.mqtt
client.id.lengthThe length of the randomly generated client id (if a client id is not provided).8
ws.pathThe WebSocket path on a broker./mqtt
auth.usernameThe username to use for authentication. 
auth.passwordThe password to use for authentication. 
auth.password.envThe environment variable to read the password from. 
auth.password.fileThe file to read the password from. 
auth.client.certThe path to the client certificate. 
auth.client.keyThe path to the client key corresponding to the certificate. 
auth.server.cafileThe path to the server certificate. 
auth.keystoreThe path to the client keystore for client side authentication. 
auth.keystore.passwordThe password for the keystore. 
auth.keystore.privatekey.passwordThe password for the private key inside the keystore. 
auth.truststoreThe path to the client truststore to enable encrypted certificate based communication. 
auth.truststore.passwordThe password for the truststore. 
client.subscribe.outputThe filepath to which all the received publishes of a subscribed client will be written to. See sub -of option. 
logfile.levelThe debug level for the logfile which may be one of the following values: {INFO \| DEBUG \| TRACE}debug
logfile.pathThe path to the logfile directory to which all the logs will be written.~/.mqtt-cli/logs