MQTT default version v5

This commit is contained in:
hxy7yx
2024-09-06 13:50:03 +08:00
parent ef2099414e
commit a64e844349
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -198,6 +198,7 @@ static int azure_parse_config(neu_plugin_t *plugin, const char *setting,
config->cert = cert.v.val_str;
config->key = key.v.val_str;
plog_notice(plugin, "config MQTT version : %d", config->version);
plog_notice(plugin, "config client-id : %s", config->client_id);
plog_notice(plugin, "config qos : %d", config->qos);
plog_notice(plugin, "config format : %s",
+1 -1
View File
@@ -221,7 +221,7 @@ int mqtt_config_parse(neu_plugin_t *plugin, const char *setting,
neu_json_elem_t version = {
.name = "version",
.t = NEU_JSON_INT,
.v.val_int = NEU_MQTT_VERSION_V311, // default to V311
.v.val_int = NEU_MQTT_VERSION_V5, // default to V5
.attribute = NEU_JSON_ATTRIBUTE_OPTIONAL, // for backward compatibility
};
neu_json_elem_t client_id = { .name = "client-id", .t = NEU_JSON_STR };