Configuring the MQTT transport

The MQTT transport allows the probe to connect to and receive messages from an MQTT provider.

MQTT transport properties

The following table describes the properties used to configure the file.
Table 1. MQTT transport properties

Property name



Use this property to specify the URL of the MQTT bus provider.

The default is tcp://localhost:1883/.


Use this property to specify an ID for each MQTT client connection to the MQTT provider. The clientId of each MQTT client connection must be unique.

The default is MQTTClient.


Use this property to specify the name of a topic to subscribe to for messages. To subscribe to multiple topics, you can define multiple topic names.

The default is "".

Note: The MQTT wildcard character # can be used to define a wildcard set of topics to subscribe to. For example, a value of # would register interest in all topics known to the MQTT provider.


Use this property to specify whether or not the connection should perform a clean start.

The default is false.

If you specify a value of false, any message stored by the MQTT provider for a connection client ID will be returned on startup.


Use this property to specify the frequency (in seconds) with which the MQTT provider connection is polled during periods of inactivity. Polling keeps the connection alive and active.

The default is 30.

The following is an example of an MQTT properties file:
# Example format of MQTT properties file
# Uncomment the relevant lines and change the settings accordingly
# connectionURL - the URL of the MQTT provider
# clientId - the id to be used for this instance of an MQTT client 
# (must be unique for each client)
# topicName - name of a topic on which to subscribe for messages 
# (can be more than one)
# cleanStart - true or false - decide whether to do a clean start 
# when reading messages
# keepAlive - duration, in seconds, to keep the connection alive 
# with no activity