Skip to main content
Version: Previous

Update queue - MQTT

The Genesis low-code platform provides the option to use an external MQTT broker such as Mosquitto or RabbitMQ as the transport mechanism for the Genesis update queue.

Using a centralised external broker is highly recommended for complex, large or dynamically scaled clusters, as it reduces the complexity and overhead of peer-to-peer connectivity.

MQTT configuration options

To use MQTT in your Genesis application, you need to set the MqLayer in the system definition.

genesis-system-definition.kts
systemDefinition {
global {
...
item(name = "MqLayer", value = "MQTT")
...
}
}

Other config values that are available are listed below:

Config ItemDescriptionDefault
MqttBrokerUrlThe URL of the MQTT brokertcp://localhost:1883
MqttQosThe MQTT Quality of Service level

At most once (0)
At least once (1)
Exactly once (2)
2
MqttClientIdA template pattern for the client ID using HOSTNAME and PROCESS_NAMEgenesis/{{HOSTNAME}}/{{PROCESS_NAME}}
MqttQueueNamePatternA template pattern for the queue name using TABLE_NAMEgenesis/database/{{TABLE_NAME}}
MqttThreadPoolSizeNumber of threads to use4
MqttUsernameMQTT Usernamenull
MqttPasswordMQTT Passwordnull
MqttTlsVerifySetting to false ignores certificate verification. This should only be set to false in a dev or test environment.true