jiejieTop / mqttclient

A high-performance, high-stability, cross-platform MQTT client, developed based on the socket API, can be used on embedded devices (FreeRTOS / LiteOS / RT-Thread / TencentOS tiny), Linux, Windows, Mac, with a very concise The API interface realizes the quality of service of QOS2 with very few resources, and seamlessly connects the mbedtls encryption library.
Apache License 2.0
703 stars 256 forks source link

mqtt_subscribe 缓存已经改成8192, 最大接受数据971个 #95

Open zheng618 opened 9 months ago

zheng618 commented 9 months ago

topic: topic1_subscribe message:{ "VIN":"1C22C00001", "terminalID":0, "frameID":10, "sysDataType":1002, "timestamp":1532345667, "code":"01", "data":{ "RCU":"FAFAFAFAFAFAFAFA", "BCM":"FAFAFAFAFAFAFAFA", "DC":"FAFAFAFAFAFAFAFA", "EHB1":"FAFAFAFAFAFAFAFA", "EHB2":"FAFAFAFAFAFAFAFA", "EPB1":"FAFAFAFAFAFAFAFA", "EPB2":"FAFAFAFAFAFAFAFA", "EPS[2024-01-23 00:51:51.380] [warning] ---------------------------971

define MQTT_MAX_PACKET_ID (0xFFFF - 1)

define MQTT_TOPIC_LEN_MAX 64

define MQTT_ACK_HANDLER_NUM_MAX 64

define MQTT_DEFAULT_BUF_SIZE 8192

define MQTT_DEFAULT_CMD_TIMEOUT 5000

define MQTT_MAX_CMD_TIMEOUT 20000

define MQTT_MIN_CMD_TIMEOUT 1000

define MQTT_KEEP_ALIVE_INTERVAL 50 // unit: second

define MQTT_VERSION 4 // 4 is mqtt 3.1.1

define MQTT_RECONNECT_DEFAULT_DURATION 1000

define MQTT_THREAD_STACK_SIZE 2048

define MQTT_THREAD_PRIO 5

define MQTT_THREAD_TICK 50