1# Socket MQTT Library for Zephyr 2 3# Copyright (c) 2018 Nordic Semiconductor ASA 4# SPDX-License-Identifier: Apache-2.0 5 6config MQTT_LIB 7 bool "Socket MQTT Library Support" 8 select NET_SOCKETS 9 help 10 Enable the Zephyr MQTT Library 11 12if MQTT_LIB 13 14module=MQTT 15module-dep=NET_LOG 16module-str=Log level for MQTT 17module-help=Enables mqtt debug messages. 18source "subsys/net/Kconfig.template.log_config.net" 19 20choice 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 26config 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 33config 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 41endchoice 42 43config MQTT_KEEPALIVE 44 int "Maximum number of clients Keep alive time for MQTT (in seconds)" 45 default 60 46 help 47 Keep alive time for MQTT (in seconds). Sending of Ping Requests to 48 keep the connection alive are governed by this value. 49 50config MQTT_LIB_TLS 51 bool "TLS support for socket MQTT Library" 52 help 53 Enable TLS support for socket MQTT Library 54 55config MQTT_LIB_TLS_USE_ALPN 56 bool "ALPN support for MQTT" 57 depends on MQTT_LIB_TLS 58 help 59 Enable ALPN protocol for socket MQTT Library. 60 61config MQTT_LIB_WEBSOCKET 62 bool "Websocket support for socket MQTT Library" 63 help 64 Enable Websocket support for socket MQTT Library. 65 66config MQTT_LIB_CUSTOM_TRANSPORT 67 bool "Custom transport support for socket MQTT Library" 68 help 69 Enable custom transport support for socket MQTT Library. 70 User must provide implementation for transport procedure. 71 72config MQTT_CLEAN_SESSION 73 bool "MQTT Clean Session Flag." 74 help 75 When a client connects to a MQTT broker using a persistent session, 76 the message broker saves all subscriptions. When the client 77 disconnects, the message broker stores unacknowledged QoS 1 messages 78 and new QoS 1 messages published to topics to which the client is 79 subscribed. When the client reconnects to the persistent session, 80 all subscriptions are reinstated and all stored messages are sent to 81 the client. Setting this flag to 0 allows the client to create a 82 persistent session. 83 84#if MQTT_VERSION_5_0 85 86config MQTT_USER_PROPERTIES_MAX 87 int "Maximum number of user properties in a packet" 88 default 1 89 range 1 $(UINT16_MAX) 90 help 91 Maximum number of user properties that the client can include in a 92 packet or parse on input. 93 94config MQTT_SUBSCRIPTION_ID_PROPERTIES_MAX 95 int "Maximum number of Subscription ID properties in a Publish packet" 96 default 1 97 range 1 32 98 help 99 Maximum number of Subscription ID properties that the client can 100 parse when processing Publish message. 101 102config MQTT_TOPIC_ALIAS_MAX 103 int "Maximum number of supported topic aliases" 104 default 5 105 range 0 $(UINT16_MAX) 106 help 107 Maximum number of supported topic aliases used in PUBLISH packets. 108 If set to 0, topic aliasing is disabled. 109 110config MQTT_TOPIC_ALIAS_STRING_MAX 111 int "The longest topic name that can be aliased" 112 default 64 113 range 8 $(UINT16_MAX) 114 help 115 Specifies a size of a buffer for storing aliased topics. 116 117#endif # MQTT_VERSION_5_0 118 119endif # MQTT_LIB 120