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 Item | Description | Default |
---|---|---|
MqttBrokerUrl | The URL of the MQTT broker | tcp://localhost:1883 |
MqttQos | The MQTT Quality of Service level At most once (0) At least once (1) Exactly once (2) | 2 |
MqttClientId | A template pattern for the client ID using HOSTNAME and PROCESS_NAME | genesis/{{HOSTNAME}}/{{PROCESS_NAME}} |
MqttQueueNamePattern | A template pattern for the queue name using TABLE_NAME | genesis/database/{{TABLE_NAME}} |
MqttThreadPoolSize | Number of threads to use | 4 |
MqttUsername | MQTT Username | null |
MqttPassword | MQTT Password | null |
MqttTlsVerify | Setting to false ignores certificate verification. This should only be set to false in a dev or test environment. | true |