Project: EMQ Technologies (App Definition and Development / Streaming & Messaging)
File: v5.1.0.en.md

A new utility function timezonetooffset_seconds/1 has been added to the rule engine SQL language. This function converts a timezone string (for example, "+02:00", "Z" and "local") to the corresponding offset in seconds. The MQTT bridge has been enhanced to utilize connection pooling and leverage available parallelism, substantially improving throughput. As a consequence, single MQTT bridge now uses a pool of `clientid`s to connect to the remote broker. Added a new `deliver_rate` option to the retainer configuration, which can limit the maximum delivery rate per session in the retainer. Provided a callback method of Unary type in ExProto to avoid possible message disorder issues. Reduced the overhead during configuration reads by optimizing the configuration read mechanism. The data bridge resource option `autorestartinterval` was deprecated in favor of `healthcheckinterval`, and `requesttimeout` was renamed to `requestttl`. Also, the default `request_ttl` value went from 15 seconds to 45 seconds. The previous existence of both `autorestartinterval` and `healthcheckinterval` was a source of confusion, as both parameters influenced the recovery of data bridges under failures. An inconsistent configuration of those two parameters could lead to messages being expired without a chance to retry. Now, `healthcheckinterval` is used both to control the periodicity of health checks that may transition the data bridge into `disconnected` or `connecting` states, as well as recovering from `disconnected`. Upgraded Erlang/OTP to 25.3.2-1. Removed the deprecated HTTP APIs for gateways. Added support for configuring TCP keep-alive in MQTT/TCP and MQTT/SSL listeners. Added `live_connections` field for some HTTP APIs, i.e: `/monitorcurrent`, `/monitorcurrent/nodes/{node}` `/monitor/nodes/{node}`, `/monitor` `/node/{node}`, `/nodes` Improved the collection speed of Prometheus metrics when setting `prometheus.vmdistcollector=disabled` and metric `erlangvmstatisticsrunqueueslengthtotal` is renamed to `erlangvmstatisticsrunqueues_length` Renamed `emqx ctl` command `clustercall` to `conf clustersync`. The old command `cluster_call` is still a valid command, but not included in usage info. Improved log security when data bridge creation fails to ensure sensitive data is always obfuscated. Allowed `enable` as well as `enabled` as the state flag for listeners. Prior to this change, listener can be enable/disabled by setting the `true` or `false` on the `enabled` config. This is slightly different naming comparing to other state flags in the system. Now the `enable` flag is added as an alias in listener config. A query_mode parameter has been added to the Kafka producer bridge. This parameter allows you to specify if the bridge should use the asynchronous or synchronous mode when sending data to Kafka. The default is asynchronous mode. Added CLI commands `emqx ctl export` and `emqx ctl import` for importing/exporting configuration and user data. This allows exporting configurations and built-in database data from a running EMQX cluster and importing them into the same or another running EMQX

Added support for unlimited max connections for gateway listeners by allowing infinity as a valid value for the `max_connections` field in the configuration and HTTP API. Improved log security for JWT, now it will be obfuscated before print. Hid the broker config and changed the `broker.sharedsubscriptionstrategy` to `mqtt.sharedsubscriptionstrategy` as it belongs to `mqtt`. The listener's authentication and zone related apis have been officially removed in version `5.1.0`. Renamed config `log.file.to` to `log.file.path`. Only include enabled authenticators and authorizers in telemetry report, not all of them. Fixed multiple issues with the Stomp gateway, including: Fixed an issue where `is_superuser` was not working correctly. Fixed an issue where the mountpoint was not being removed in message delivery. After a message or subscription request fails, the Stomp client should be disconnected immediately after replying with an ERROR message. Added validation to ensure that certificate `depth` (listener SSL option) is a non negative integer. Fixed an issue where trying to get rule info or metrics could result in a crash when a node is joining a cluster. Fixed a potential issue where requests to bridges might take a long time to be retried. This only affected low throughput scenarios, where the buffering layer could take a long time to detect connectivity and driver problems. Fixed an issue where the Dashboard shows that the connection still exists after a CoAP connection is disconnected, but deletion and message posting requests do not take effect. Added a new REST API `POST /clients/kickout/bulk` for kicking out multiple clients in bulk. Fixed a race-condition in channel info registration. Prior to this fix, when system is under heavy load, it might happen that a client is disconnected (or has its session expired) but still can be found in the clients page in dashboard. One of the possible reasons is a race condition fixed in this PR: the connection is killed in the middle of channel data registration. Added a schema validation for duration data type to avoid invalid values. Before this fix, it was possible to use absurd values in the schema that would exceed the system limit, causing a crash. Disallow enabling `failifnopeercert` in listener SSL options if `verify = verify_none` is set. Setting `failifnopeercert = true` and `verify = verify_none` caused connection errors due to incompatible options. This fix validates the options when creating or updating a listener to avoid these errors. Note: any old listener configuration with `failifnopeercert = true` and `verify = verify_none` that was previously allowed will fail to load after applying this fix and must be manually fixed. Fixed the issue in MQTT-SN gateway where the `mountpoint` does not take effect on message publishing. Deprecated UDP mcast mechanism for cluster discovery. This feature has been planed for deprecation since 5.0 mainly due to the lack of actual production use. This feature code is not yet removed in

but the document interface is demoted. Avoid syncing cluser.hocon file from the nodes running a newer version than the self-node. During cluster rolling upgrade, if an older version node has to restart due to whatever reason, if it copies the `cluster.hocon` file from a newer version node, it may fail to start. After this fix, the older version node will not copy the `cluster.hocon` file from a newer, so it will use its own `cluster.hocon` file to start. The error message and log entry that appear when one tries to create a bridge with a name the exceeds 255 bytes is now easier to understand. Fixed the issue when mqtt clients could not connect over TLS if the listener was configured to use TLS v1.3 only. The problem was that TLS connection was trying to use options incompatible with TLS v1.3. Fixed the delay in updating subscription count metric and corrected configuration issues in Stomp gateway. Fixed the issue where the `enable_qos` option does not take effect in the MQTT-SN gateway. Redacted `proxy-authorization` headers as used by HTTP connector to avoid leaking secrets into log files. For any unknown HTTP/API request, the default response is a 404 error rather than the dashboard's index.html. Fixed the issue where the `method` field cannot be correctly printed in the trace logs of AuthN HTTP. Fixed the issue in MQTT-SN gateway where deleting Predefined Topics configuration does not work. Improved error messages when a validation error occurs while using the Listeners HTTP API. Deprecated the `mountpoint` field in `AuthenticateRequest` in ExProto gateway. This field was introduced in e4.x, but in fact, in e5.0 we have provided `gateway.exproto.mountpoint` for configuration, so there is no need to override it through the Authenticate request. Additionally, updates the default value of `subscriptionsmax`, `inflightmax`, `mqueue_max` to `infinity`. Fixed crash on REST API `GET /listeners` when listener's `max_connections` is set to a string. Disallowed using multiple TLS versions in the listener config that include tlsv1.3 but exclude tlsv1.2. Using TLS configuration with such version gap caused connection errors. Additionally, drop and log TLS options that are incompatible with the selected TLS version(s). Note: any old listener configuration with the version gap described above will fail to load after applying this fix and must be manually fixed. Fixed the issue where newly created listeners sometimes do not start properly. When you delete a system default listener and add a new one named 'default', it will not start correctly. Fixed the bug where configuration failure on certain nodes can cause Dashboard unavailability. Fixed the problem that the `cluster.autoclean` configuration item does not take effect. and Fixed problem when replicant nodes were unable to connect to the core node due to timeout in `mrialb:corenodes()` call. Relevant mria pull request: