Merge pull request #10367 from id/0411-sync-release-50-back-to-master

0411 sync release 50 back to master
This commit is contained in:
Ivan Dyachkov 2023-04-12 17:23:17 +02:00 committed by GitHub
commit f01e2f358b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 346 additions and 30 deletions

View File

@ -6,7 +6,7 @@ export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/5.0-28:1.13.4-24.3.4.2-2
export EMQX_DEFAULT_RUNNER = debian:11-slim
export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh)
export ELIXIR_VSN ?= $(shell $(CURDIR)/scripts/get-elixir-vsn.sh)
export EMQX_DASHBOARD_VERSION ?= v1.2.0
export EMQX_DASHBOARD_VERSION ?= v1.2.1
export EMQX_EE_DASHBOARD_VERSION ?= e1.0.5
export EMQX_REL_FORM ?= tgz
export QUICER_DOWNLOAD_FROM_RELEASE = 1

View File

@ -35,7 +35,7 @@
-define(EMQX_RELEASE_CE, "5.0.21").
%% Enterprise edition
-define(EMQX_RELEASE_EE, "5.0.2-rc.4").
-define(EMQX_RELEASE_EE, "5.0.2").
%% the HTTP API version
-define(EMQX_API_VERSION, "5.0").

View File

@ -1,5 +1,6 @@
%% This file is automatically generated by `make static_checks`, do not edit.
{emqx,1}.
{emqx,2}.
{emqx_authn,1}.
{emqx_authz,1}.
{emqx_bridge,1}.

View File

@ -3,7 +3,7 @@
{id, "emqx"},
{description, "EMQX Core"},
% strict semver, bump manually!
{vsn, "5.0.21"},
{vsn, "5.0.22"},
{modules, []},
{registered, []},
{applications, [

View File

@ -28,17 +28,17 @@
%%--------------------------------------------------------------------
%% exported API
%%--------------------------------------------------------------------
-spec with_node(binary(), fun((atom()) -> {ok, term()} | {error, term()})) ->
-spec with_node(binary() | atom(), fun((atom()) -> {ok, term()} | {error, term()})) ->
?OK(term()) | ?NOT_FOUND(binary()) | ?BAD_REQUEST(term()).
with_node(BinNode, Fun) ->
case lookup_node(BinNode) of
with_node(Node0, Fun) ->
case lookup_node(Node0) of
{ok, Node} ->
handle_result(Fun(Node));
not_found ->
?NODE_NOT_FOUND(BinNode)
?NODE_NOT_FOUND(Node0)
end.
-spec with_node_or_cluster(binary(), fun((atom()) -> {ok, term()} | {error, term()})) ->
-spec with_node_or_cluster(binary() | atom(), fun((atom()) -> {ok, term()} | {error, term()})) ->
?OK(term()) | ?NOT_FOUND(iolist()) | ?BAD_REQUEST(term()).
with_node_or_cluster(<<"all">>, Fun) ->
handle_result(Fun(all));
@ -49,18 +49,24 @@ with_node_or_cluster(Node, Fun) ->
%% Internal
%%--------------------------------------------------------------------
-spec lookup_node(binary()) -> {ok, atom()} | not_found.
lookup_node(BinNode) ->
-spec lookup_node(atom() | binary()) -> {ok, atom()} | not_found.
lookup_node(BinNode) when is_binary(BinNode) ->
case emqx_misc:safe_to_existing_atom(BinNode, utf8) of
{ok, Node} ->
case lists:member(Node, mria:running_nodes()) of
true ->
{ok, Node};
false ->
not_found
end;
is_running_node(Node);
_Error ->
not_found
end;
lookup_node(Node) when is_atom(Node) ->
is_running_node(Node).
-spec is_running_node(atom()) -> {ok, atom()} | not_found.
is_running_node(Node) ->
case lists:member(Node, mria:running_nodes()) of
true ->
{ok, Node};
false ->
not_found
end.
handle_result({ok, Result}) ->

View File

@ -27,6 +27,8 @@
cast/5,
multicall/4,
multicall/5,
multicall_on_running/5,
on_running/3,
unwrap_erpc/1
]).
@ -91,6 +93,17 @@ multicall(Nodes, Mod, Fun, Args) ->
multicall(Key, Nodes, Mod, Fun, Args) ->
gen_rpc:multicall(rpc_nodes([{Key, Node} || Node <- Nodes]), Mod, Fun, Args).
-spec multicall_on_running([node()], module(), atom(), list(), timeout()) -> [term() | {error, _}].
multicall_on_running(Nodes, Mod, Fun, Args, Timeout) ->
unwrap_erpc(erpc:multicall(Nodes, emqx_rpc, on_running, [Mod, Fun, Args], Timeout)).
-spec on_running(module(), atom(), list()) -> term().
on_running(Mod, Fun, Args) ->
case emqx:is_running() of
true -> apply(Mod, Fun, Args);
false -> error(emqx_down)
end.
-spec cast(node(), module(), atom(), list()) -> cast_result().
cast(Node, Mod, Fun, Args) ->
%% Note: using a non-ordered cast here, since the generated key is

View File

@ -0,0 +1,86 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%--------------------------------------------------------------------
-module(emqx_proto_v2).
-behaviour(emqx_bpapi).
-include("bpapi.hrl").
-export([
introduced_in/0,
are_running/1,
is_running/1,
get_alarms/2,
get_stats/1,
get_metrics/1,
deactivate_alarm/2,
delete_all_deactivated_alarms/1,
clean_authz_cache/1,
clean_authz_cache/2,
clean_pem_cache/1
]).
introduced_in() ->
"5.0.22".
-spec is_running(node()) -> boolean() | {badrpc, term()}.
is_running(Node) ->
rpc:call(Node, emqx, is_running, []).
-spec are_running([node()]) -> emqx_rpc:erpc_multicall(boolean()).
are_running(Nodes) when is_list(Nodes) ->
erpc:multicall(Nodes, emqx, is_running, []).
-spec get_alarms(node(), all | activated | deactivated) -> [map()].
get_alarms(Node, Type) ->
rpc:call(Node, emqx_alarm, get_alarms, [Type]).
-spec get_stats(node()) -> emqx_stats:stats() | {badrpc, _}.
get_stats(Node) ->
rpc:call(Node, emqx_stats, getstats, []).
-spec get_metrics(node()) -> [{emqx_metrics:metric_name(), non_neg_integer()}] | {badrpc, _}.
get_metrics(Node) ->
rpc:call(Node, emqx_metrics, all, []).
-spec clean_authz_cache(node(), emqx_types:clientid()) ->
ok
| {error, not_found}
| {badrpc, _}.
clean_authz_cache(Node, ClientId) ->
rpc:call(Node, emqx_authz_cache, drain_cache, [ClientId]).
-spec clean_authz_cache(node()) -> ok | {badrpc, _}.
clean_authz_cache(Node) ->
rpc:call(Node, emqx_authz_cache, drain_cache, []).
-spec clean_pem_cache(node()) -> ok | {badrpc, _}.
clean_pem_cache(Node) ->
rpc:call(Node, ssl_pem_cache, clear, []).
-spec deactivate_alarm(node(), binary() | atom()) ->
ok | {error, not_found} | {badrpc, _}.
deactivate_alarm(Node, Name) ->
rpc:call(Node, emqx_alarm, deactivate, [Name]).
-spec delete_all_deactivated_alarms(node()) -> ok | {badrpc, _}.
delete_all_deactivated_alarms(Node) ->
rpc:call(Node, emqx_alarm, delete_all_deactivated_alarms, []).

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_bridge, [
{description, "EMQX bridges"},
{vsn, "0.1.14"},
{vsn, "0.1.15"},
{registered, [emqx_bridge_sup]},
{mod, {emqx_bridge_app, []}},
{applications, [

View File

@ -1,6 +1,6 @@
{application, emqx_conf, [
{description, "EMQX configuration management"},
{vsn, "0.1.15"},
{vsn, "0.1.16"},
{registered, []},
{mod, {emqx_conf_app, []}},
{applications, [kernel, stdlib, emqx_ctl]},

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_connector, [
{description, "EMQX Data Integration Connectors"},
{vsn, "0.1.18"},
{vsn, "0.1.19"},
{registered, []},
{mod, {emqx_connector_app, []}},
{applications, [

View File

@ -2,7 +2,7 @@
{application, emqx_dashboard, [
{description, "EMQX Web Dashboard"},
% strict semver, bump manually!
{vsn, "5.0.16"},
{vsn, "5.0.17"},
{modules, []},
{registered, [emqx_dashboard_sup]},
{applications, [kernel, stdlib, mnesia, minirest, emqx, emqx_ctl]},

View File

@ -132,6 +132,8 @@ dashboard_samplers_fun(Latest) ->
end
end.
monitor_current(get, #{bindings := []}) ->
emqx_api_lib:with_node_or_cluster(erlang:node(), fun emqx_dashboard_monitor:current_rate/1);
monitor_current(get, #{bindings := Bindings}) ->
RawNode = maps:get(node, Bindings, <<"all">>),
emqx_api_lib:with_node_or_cluster(RawNode, fun current_rate/1).

View File

@ -2,7 +2,7 @@
{application, emqx_management, [
{description, "EMQX Management API and CLI"},
% strict semver, bump manually!
{vsn, "5.0.17"},
{vsn, "5.0.18"},
{modules, []},
{registered, [emqx_management_sup]},
{applications, [kernel, stdlib, emqx_plugins, minirest, emqx, emqx_ctl]},

View File

@ -129,7 +129,19 @@ list(get, #{query_string := Qs}) ->
_ ->
Data = [
maps:from_list(emqx_mgmt:get_stats(Node) ++ [{node, Node}])
|| Node <- mria:running_nodes()
|| Node <- running_nodes()
],
{200, Data}
end.
%%%==============================================================================================
%% Internal
running_nodes() ->
Nodes = erlang:nodes([visible, this]),
RpcResults = emqx_proto_v2:are_running(Nodes),
[
Node
|| {Node, IsRunning} <- lists:zip(Nodes, RpcResults),
IsRunning =:= {ok, true}
].

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*-
{application, emqx_resource, [
{description, "Manager for all external resources"},
{vsn, "0.1.11"},
{vsn, "0.1.12"},
{registered, []},
{mod, {emqx_resource_app, []}},
{applications, [

View File

@ -2,7 +2,7 @@
{application, emqx_rule_engine, [
{description, "EMQX Rule Engine"},
% strict semver, bump manually!
{vsn, "5.0.12"},
{vsn, "5.0.13"},
{modules, []},
{registered, [emqx_rule_engine_sup, emqx_rule_engine]},
{applications, [kernel, stdlib, rulesql, getopt, emqx_ctl]},

View File

@ -525,6 +525,8 @@ inc_action_metrics(R, RuleId) ->
is_ok_result(ok) ->
true;
is_ok_result({async_return, R}) ->
is_ok_result(R);
is_ok_result(R) when is_tuple(R) ->
ok == erlang:element(1, R);
is_ok_result(_) ->

View File

@ -0,0 +1 @@
Add MQTT ingress to helm charts and update helm charts documentation

View File

@ -0,0 +1 @@
Ensure Monitor API `/monitor(_current)/nodes/:node` returns `404` instead of `400` if node does not exist.

View File

@ -0,0 +1 @@
如果 API 查询的节点不存在,将会返回 `404` 而不再是 `400`

View File

@ -1 +1 @@
Fix: configuration parameter `mqtt.max_awaiting_rel` had no effect.
The configuration parameter `mqtt.max_awaiting_rel` was not functional and has now been corrected.

View File

@ -0,0 +1,9 @@
For operations on Bridges API if `bridge-id` is unknown we now return `404`
instead of `400`. Also a bug was fixed that caused a crash if that was a node
operation. Additionally we now also check if the given bridge is enabled when
doing the cluster operation `start` . Affected endpoints:
* [cluster] `/bridges/:id/:operation`,
* [node] `/nodes/:node/bridges/:id/:operation`, where `operation` is one of
`[start|stop|restart]`.
Moreover, for a node operation, EMQX checks if node name is in our cluster and
return `404` instead of `501`.

View File

@ -0,0 +1 @@
将数据桥接和连接器的 resume_interval 参数值设为 health_check_interval 和 request_timeout / 3 中的较小值,以解决请求超时的问题。

View File

@ -0,0 +1 @@
当调用 `/nodes/:node[/metrics|/stats]` API ,若节点不存在则返回 `404` 状态码。

View File

@ -0,0 +1 @@
修复了当删除一个使用中的 ingress 类型的桥接时,未提示存在规则依赖的问题。

View File

@ -0,0 +1,2 @@
Fix /monitor_current API so that it only looks at the current node.
Fix /stats API to not crash when one or more nodes in the cluster are down.

View File

@ -0,0 +1 @@
修复 `/monitor_current` API ,使其仅查看当前 节点。修复了 `/stats` API以防止当集群中的一个或多个节点关闭时出现崩溃。

View File

@ -0,0 +1 @@
在收到不可恢复的错误时,不要增加 'actions.failed.unknown' 规则指标计数。

87
changes/e5.0.2.en.md Normal file
View File

@ -0,0 +1,87 @@
# e5.0.2
## Enhancements
- [#10022](https://github.com/emqx/emqx/pull/10022) Release installation packages for Rocky Linux 9 (compatible with Red Hat Enterprise Linux 9) and macOS 12 for Intel platform.
- [#10139](https://github.com/emqx/emqx/pull/10139) Add `extraVolumeMounts` to EMQX Helm Chart, you can mount user's own files to EMQX instance, such as ACL rule files mentioned in [#9052](https://github.com/emqx/emqx/issues/9052).
- [#9893](https://github.com/emqx/emqx/pull/9893) When connecting with the flag `clean_start=false`, EMQX will filter out messages that published by clients banned by the blacklist feature in the session.
Previously, messages sent by clients banned by the blacklist feature could still be delivered to subscribers in this case.
- [#9986](https://github.com/emqx/emqx/pull/9986) Add MQTT ingress to helm charts and remove obsolete mgmt references.
- [#9564](https://github.com/emqx/emqx/pull/9564) Implement Kafka Consumer Bridge, which supports consuming messages from Kafka and publishing them to MQTT topics.
- [#9881](https://github.com/emqx/emqx/pull/9881) Improve error logging related to health checks for InfluxDB connections.
- [#10123](https://github.com/emqx/emqx/pull/10123) Improve the performance of `/bridges` API.
Earlier, when the number of nodes in the cluster was large or the node was busy, the API may had a request timeout.
- [#9998](https://github.com/emqx/emqx/pull/9998) Obfuscate request body in error log when using HTTP service for client authentication for security reasons.
- [#10026](https://github.com/emqx/emqx/pull/10026) Metrics are now only exposed via the `/bridges/:id/metrics` endpoint, and no longer returned in other API operations.
- [#10052](https://github.com/emqx/emqx/pull/10052) Improve startup failure logs in daemon mode.
## Bug Fixes
- [#10013](https://github.com/emqx/emqx/pull/10013) Fix return type structure for error case in API schema for `/gateways/:name/clients`.
- [#10014](https://github.com/emqx/emqx/pull/10014) Ensure Monitor API `/monitor(_current)/nodes/:node` returns `404` instead of `400` if node does not exist.
- [#10027](https://github.com/emqx/emqx/pull/10027) Allow setting node name via environment variable `EMQX_NODE__NAME` in Docker.
- [#10050](https://github.com/emqx/emqx/pull/10050) Ensure Bridge API returns `404` status code consistently for resources that don't exist.
- [#10055](https://github.com/emqx/emqx/pull/10055) The configuration parameter `mqtt.max_awaiting_rel` was not functional and has now been corrected.
- [#10056](https://github.com/emqx/emqx/pull/10056) Fix `/bridges` API status code.
Return `400` instead of `403` in case of removing a data bridge that is dependent on an active rule.
Return `400` instead of `403` in case of calling operations (start|stop|restart) when Data-Bridging is not enabled.
- [#10066](https://github.com/emqx/emqx/pull/10066) Improve error messages for `/briges_probe` and `[/node/:node]/bridges/:id/:operation` API calls to make them more readable. And set HTTP status code to `400` instead of `500`.
- [#10074](https://github.com/emqx/emqx/pull/10074) Check if type in `PUT /authorization/sources/:type` matches `type` given in the request body.
- [#10079](https://github.com/emqx/emqx/pull/10079) Fix wrong description about `shared_subscription_strategy`.
- [#10085](https://github.com/emqx/emqx/pull/10085) Consistently return `404` for all requests on non-existent source in `/authorization/sources/:source[/*]`.
- [#10098](https://github.com/emqx/emqx/pull/10098) Fix an issue where the MongoDB connector crashed when MongoDB authorization was configured.
- [#10100](https://github.com/emqx/emqx/pull/10100) Fix channel crash for slow clients with enhanced authentication.
Previously, when the client was using enhanced authentication, but the Auth message was sent slowly or the Auth message was lost, the client process would crash.
- [#10107](https://github.com/emqx/emqx/pull/10107) For operations on Bridges API if `bridge-id` is unknown we now return `404` instead of `400`.
- [#10117](https://github.com/emqx/emqx/pull/10117) Fix an error occurring when a joining node doesn't have plugins that are installed on other nodes in the cluster.
After this fix, the joining node will copy all the necessary plugins from other nodes.
- [#10118](https://github.com/emqx/emqx/pull/10118) Fix problems related to manual joining of EMQX replicant nodes to the cluster.
- [#10119](https://github.com/emqx/emqx/pull/10119) Fix crash when `statsd.server` is set to an empty string.
- [#10124](https://github.com/emqx/emqx/pull/10124) The default heartbeat period for MongoDB has been increased to reduce the risk of too excessive logging to the MongoDB log file.
- [#10130](https://github.com/emqx/emqx/pull/10130) Fix garbled config display in dashboard when the value is originally from environment variables.
- [#10132](https://github.com/emqx/emqx/pull/10132) Fix some error logs generated by `systemctl stop emqx` command.
Prior to the fix, the command was not stopping `jq` and `os_mon` applications properly.
- [#10144](https://github.com/emqx/emqx/pull/10144) Fix an issue where emqx cli failed to set the Erlang cookie when the emqx directory was read-only.
- [#10154](https://github.com/emqx/emqx/pull/10154) Change the default `resume_interval` for bridges and connectors to be the minimum of `health_check_interval` and `request_timeout / 3` to resolve issue of request timeout.
- [#10157](https://github.com/emqx/emqx/pull/10157) Fix default rate limit configuration not being applied correctly when creating a new listener.
- [#10237](https://github.com/emqx/emqx/pull/10237) Ensure we return `404` status code for unknown node names in `/nodes/:node[/metrics|/stats]` API.
- [#10251](https://github.com/emqx/emqx/pull/10251) Fix an issue where rule dependencies were not prompted when deleting an ingress-type bridge in use.
- [#10313](https://github.com/emqx/emqx/pull/10313) Ensure that when the core or replicant node starting, the `cluster-override.conf` file is only copied from the core node.
- [#10327](https://github.com/emqx/emqx/pull/10327) Don't increase “actions.failed.unknown” rule metrics counter upon receiving unrecoverable data bridge errors.
- [#10095](https://github.com/emqx/emqx/pull/10095) Fix an issue where when the MySQL connector was in batch mode, clients would keep querying the server with unnecessary `PREPARE` statements on each batch, possibly causing server resource exhaustion.

79
changes/e5.0.2.zh.md Normal file
View File

@ -0,0 +1,79 @@
# e5.0.2
## 优化
- [#10022](https://github.com/emqx/emqx/pull/10022) 发布 Rocky Linux 9 (兼容Red Hat Enterprise Linux 9) 以及 macOS 12 Intel 平台的安装包。
- [#10139](https://github.com/emqx/emqx/pull/10139) 在 EMQX Helm Chart 中添加 `extraVolumeMounts`,可以挂载用户自己的文件到 EMQX 实例中,例如在 [#9052](https://github.com/emqx/emqx/issues/9052) 中提到的 ACL 规则文件。
- [#9893](https://github.com/emqx/emqx/pull/9893) 当使用 `clean_start=false` 标志连接时EMQX 将过滤掉会话中被被黑名单功能禁止的客户端发布的消息。以前,在这种情况下,被黑名单功能禁止的客户端发送的消息仍可能被传递给订阅者。
- [#9986](https://github.com/emqx/emqx/pull/9986) 在 helm charts 中增加 MQTT ingress 并删除过时的 `mgmt` 引用。
- [#9564](https://github.com/emqx/emqx/pull/9564) 数据桥接新增 Kafka Consumer支持从 Kafka 消费消息并将它们发布到 MQTT 主题。
- [#9881](https://github.com/emqx/emqx/pull/9881) 改进了与 InfluxDB 连接的健康检查相关的错误日志。
- [#10123](https://github.com/emqx/emqx/pull/10123) 改进了 `/bridges` API 的性能。避免了当集群节点数量较多时可能出现的请求响应超时。
- [#9998](https://github.com/emqx/emqx/pull/9998) 出于安全原因,在使用 HTTP 服务进行客户端认证时,对错误日志中的请求体进行脱敏处理。
- [#10026](https://github.com/emqx/emqx/pull/10026) 仅在 `/bridges/:id/metrics` API 中返回指标数据。
- [#10052](https://github.com/emqx/emqx/pull/10052) 改进守护进程模式下启动失败后的日志。
## 修复
- [#10013](https://github.com/emqx/emqx/pull/10013) 修复 `/gateways/:name/clients` API 在错误情况下的返回类型结构。
- [#10014](https://github.com/emqx/emqx/pull/10014) 当节点不存在时,`/monitor(_current)/nodes/:node` API 返回 `404` 错误代码而不是 `400`
- [#10027](https://github.com/emqx/emqx/pull/10027) 允许在 Docker 中通过 `EMQX_NODE__NAME` 设置节点名称。
- [#10050](https://github.com/emqx/emqx/pull/10050) 当调用 Bridge API 时若资源不能存在则返回 `404` 状态码。
- [#10055](https://github.com/emqx/emqx/pull/10055) 修复配置项 `mqtt.max_awaiting_rel` 设置无效的问题。
- [#10056](https://github.com/emqx/emqx/pull/10056) 修复 `/bridges` API 状态码返回错误。当被删除的 Bridge 存在依赖,或 Bridge 未启用时进行启用、停止、重启等操作时返回 `400` 状态码。
- [#10066](https://github.com/emqx/emqx/pull/10066) 优化 `/briges_probe``[/node/:node]/bridges/:id/:operation` API 调用的错误消息,使其更易理解。并修正错误状态码为`400`。
- [#10074](https://github.com/emqx/emqx/pull/10074) 增加 `PUT /authorization/sources/:type` 请求参数 `type` 的值与请求体中的实际类型的一致性检查。
- [#10079](https://github.com/emqx/emqx/pull/10079) 修复文档中关于 `shared_subscription_strategy` 的描述错误。
- [#10085](https://github.com/emqx/emqx/pull/10085) 对于 `/authorization/sources/:source[/*]` API 中不存在的资源的所有请求,始终返回 `404`
- [#10098](https://github.com/emqx/emqx/pull/10098) 修复了当配置 MongoDB 授权时 MongoDB 连接器崩溃的问题。
- [#10100](https://github.com/emqx/emqx/pull/10100) 修复了当客户端使用增强认证时,认证消息发送缓慢或者消息丢失时客户端进程崩溃的问题。
- [#10107](https://github.com/emqx/emqx/pull/10107) 当调用 `bridges API` 时如果 `bridge-id` 不存在则返回 `404` 状态码。
- [#10117](https://github.com/emqx/emqx/pull/10117) 修复当加入的节点没有安装在集群其他节点上的插件时发生的错误。修复后,加入的节点将从其他节点复制所有必要的插件。
- [#10118](https://github.com/emqx/emqx/pull/10118) 修复手动添加 EMQX 副本类型节点到集群的相关问题。
- [#10119](https://github.com/emqx/emqx/pull/10119) 修复了当 `statsd.server` 设置为空字符串时会崩溃的问题。
- [#10124](https://github.com/emqx/emqx/pull/10124) 调整 MongoDB 的默认心跳周期,以降低日志文件记录过多的风险。
- [#10130](https://github.com/emqx/emqx/pull/10130) 修复了通过环境变量设置的值,在 Dashboard 中显示乱码的问题。
- [#10132](https://github.com/emqx/emqx/pull/10132) 修复了 `systemctl stop emqx` 命令无法正确停止 `jq``os_mon` 应用的问题。
- [#10144](https://github.com/emqx/emqx/pull/10144) 修复了当 emqx 目录只读时, emqx cli 设置 Erlang cookie 失败的问题。
- [#10154](https://github.com/emqx/emqx/pull/10154) 将数据桥接和连接器的 `resume_interval` 参数值设为 `health_check_interval``request_timeout / 3` 中的较小值,以解决请求超时的问题。
- [#10157](https://github.com/emqx/emqx/pull/10157) 修复在创建新的监听器时默认速率限制不生效的问题。
- [#10237](https://github.com/emqx/emqx/pull/10237) 当调用 `/nodes/:node[/metrics|/stats]` API若节点不存在则返回 `404` 状态码。
- [#10251](https://github.com/emqx/emqx/pull/10251) 修复了当删除一个使用中的 ingress 类型的桥接时,未提示存在规则依赖的问题。
- [#10313](https://github.com/emqx/emqx/pull/10313) 确保在核心节点或副本节点启动时,仅从核心节点复制 `cluster-override.conf` 文件。
- [#10327](https://github.com/emqx/emqx/pull/10327) 数据桥接出现不可恢复的错误不再计入到 `actions.failed.unknown` 指标中。
- [#10095](https://github.com/emqx/emqx/pull/10095) 修复当 MySQL 连接器处于批处理模式时,会发生客户端在每个批次上不断使用不必要的 `PREPARE` 语句查询服务器,可能会导致服务器资源耗尽的问题。

View File

@ -0,0 +1,2 @@
Implement Kafka Consumer bridge.
Now it's possible to consume messages from Kafka and publish them to MQTT topics.

View File

@ -0,0 +1,4 @@
Enhance the error logs related to InfluxDB connectivity health checks.
Previously, if InfluxDB failed to pass the health checks using the specified parameters, the only message provided was "timed out waiting for it to become healthy".
With the updated implementation, the error message will be displayed in both the logs and the dashboard, enabling easier identification and resolution of the issue.

View File

@ -1,6 +1,6 @@
{application, emqx_ee_bridge, [
{description, "EMQX Enterprise data bridges"},
{vsn, "0.1.8"},
{vsn, "0.1.9"},
{registered, [emqx_ee_bridge_kafka_consumer_sup]},
{applications, [
kernel,

View File

@ -309,7 +309,7 @@ kafka_bridge_rest_api_helper(Config) ->
AtomsAfter = erlang:system_info(atom_count),
?assertEqual(AtomsBefore, AtomsAfter),
%% Create a rule that uses the bridge
{ok, 201, _Rule} = http_post(
{ok, 201, Rule} = http_post(
["rules"],
#{
<<"name">> => <<"kafka_bridge_rest_api_helper_rule">>,
@ -318,6 +318,7 @@ kafka_bridge_rest_api_helper(Config) ->
<<"sql">> => <<"SELECT * from \"kafka_bridge_topic/#\"">>
}
),
#{<<"id">> := RuleId} = emqx_json:decode(Rule, [return_maps]),
%% counters should be empty before
?assertEqual(0, emqx_resource_metrics:matched_get(ResourceId)),
?assertEqual(0, emqx_resource_metrics:success_get(ResourceId)),
@ -346,6 +347,8 @@ kafka_bridge_rest_api_helper(Config) ->
%% Check crucial counters and gauges
?assertEqual(1, emqx_resource_metrics:matched_get(ResourceId)),
?assertEqual(1, emqx_resource_metrics:success_get(ResourceId)),
?assertEqual(1, emqx_metrics_worker:get(rule_metrics, RuleId, 'actions.success')),
?assertEqual(0, emqx_metrics_worker:get(rule_metrics, RuleId, 'actions.failed')),
?assertEqual(0, emqx_resource_metrics:dropped_get(ResourceId)),
?assertEqual(0, emqx_resource_metrics:failed_get(ResourceId)),
?assertEqual(0, emqx_resource_metrics:inflight_get(ResourceId)),

View File

@ -1,6 +1,6 @@
{application, emqx_ee_connector, [
{description, "EMQX Enterprise connectors"},
{vsn, "0.1.8"},
{vsn, "0.1.9"},
{registered, []},
{applications, [
kernel,

View File

@ -61,8 +61,8 @@ emqx_ee_bridge_kafka {
}
mqtt_topic {
desc {
en: "MQTT topic or topic as data source (bridge input). Should not configure this if the bridge is used as a rule action."
zh: "指定 MQTT 主题作为桥接的数据源。 若该桥接用于规则的动作,则必须将该配置项删除。"
en: "MQTT topic or topic filter as data source (bridge input). If rule action is used as data source, this config should be left empty, otherwise messages will be duplicated in Kafka."
zh: "MQTT 主题数据源由桥接指定,或留空由规则动作指定。"
}
label {
en: "Source MQTT Topic"