mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
MQTT default version v5
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user