Skip to content

Commit ef311e1

Browse files
committed
[nrf fromtree] net: mqtt: Add Kconfig to select maximum supported MQTT version
It should be possible to select maximum supported MQTT version, so that for example MQTT 5.0 features can be compiled-out in case they're not needed. Signed-off-by: Robert Lubos <[email protected]> (cherry picked from commit f31a45f)
1 parent 9442059 commit ef311e1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

subsys/net/lib/mqtt/Kconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,29 @@ module-str=Log level for MQTT
1717
module-help=Enables mqtt debug messages.
1818
source "subsys/net/Kconfig.template.log_config.net"
1919

20+
choice MQTT_VERSION_SUPPORT
21+
prompt "Maximum MQTT protocol version supported"
22+
default MQTT_VERSION_3_1_1
23+
help
24+
Maximum MQTT protocol version supported by the library.
25+
26+
config MQTT_VERSION_3_1_1
27+
bool "Support up to version 3.1.1 of the MQTT protocol"
28+
help
29+
The MQTT version 3.1.1 will be the default library choice. Applications
30+
will still be able to choose to use an older MQTT protocol version
31+
with respective runtime MQTT client configuration.
32+
33+
config MQTT_VERSION_5_0
34+
bool "Support up to version 5.0 of the MQTT protocol [EXPERIMENTAL]"
35+
select EXPERIMENTAL
36+
help
37+
The MQTT version 5.0 will be the default library choice. Applications
38+
will still be able to choose to use an older MQTT protocol version
39+
with respective runtime MQTT client configuration.
40+
41+
endchoice
42+
2043
config MQTT_KEEPALIVE
2144
int "Maximum number of clients Keep alive time for MQTT (in seconds)"
2245
default 60

0 commit comments

Comments
 (0)