See: https://emqx.atlassian.net/wiki/spaces/P/pages/612368639/open+e5.1+remove+auto+restart+interval+from+buffer+worker+resource+options Current problem: In 5.0.x, we have two timer options that control the state changing of buffer worker resources: auto_restart_interval and health_check_interval. - auto_restart_interval controls how often the resource attempts to transition from disconnected to connected. - health_check_interval controls how often the resource is checked and potentially moved from connected to disconnected or connecting. The existence of two independent timers for very similar purposes is confusing to users, QA and even developers. Also, an intimately related configuration is request_timeout, which can interact badly with auto_restart_interval if the latter is poorly configured: requests may always expire if request_timeout < auto_restart_interval and if the resource enters the disconnected state. For health_check_interval, we attempt to derive a sane default that gives requests a chance to retry (if request timeout is finite, then the resource retries requests with a period of min(health_check_interval, request_timeout / 3). Another problem with the separate auto_restart_interval is that its default value (60 s) is too high when compared to the default request timeout and health check, leading to the problems described above if not tuned. Proposed solution: We propose to drop auto_restart_interval in favor of health_check_interval, which will be used for both disconnected -> connected and connected -> {disconnected, connecting} transition checks. With that, the resource will attempt to reconnect at the same interval as the health check, which currently is 15 s. Also, as two smaller changes to accompany this one: - Increase the default request_timeout from 15 s to 45 s. - Rename request_timeout to request_ttl. |
||
|---|---|---|
| .ci | ||
| .github | ||
| apps | ||
| bin | ||
| changes | ||
| deploy | ||
| lib-ee | ||
| rel | ||
| scripts | ||
| .editorconfig | ||
| .formatter.exs | ||
| .gitattributes | ||
| .gitignore | ||
| .tool-versions | ||
| APL.txt | ||
| build | ||
| CONTRIBUTING.md | ||
| dev | ||
| Dockerfile.ubuntu20.04.runner | ||
| Dockerfile.ubuntu20.04.runner.dockerignore | ||
| elvis.config | ||
| git-blame-ignore-revs | ||
| LICENSE | ||
| Makefile | ||
| mix.exs | ||
| NOTICE | ||
| pkg-vsn.sh | ||
| PLUGIN.md | ||
| README-CN.md | ||
| README-RU.md | ||
| README.md | ||
| rebar.config | ||
| rebar.config.erl | ||
| Windows.md | ||
EMQX
EMQX is the world's most scalable open-source MQTT broker with a high performance that connects 100M+ IoT devices in 1 cluster, while maintaining 1M message per second throughput and sub-millisecond latency.
EMQX supports multiple open standard protocols like MQTT, HTTP, QUIC, and WebSocket. It’s 100% compliant with MQTT 5.0 and 3.x standard, and secures bi-directional communication with MQTT over TLS/SSL and various authentication mechanisms.
With the built-in powerful SQL-based rules engine, EMQX can extract, filter, enrich and transform IoT data in real-time. In addition, it ensures high availability and horizontal scalability with a masterless distributed architecture, and provides ops-friendly user experience and great observability.
EMQX boasts more than 20K+ enterprise users across 50+ countries and regions, connecting 100M+ IoT devices worldwide, and is trusted by over 400 customers in mission-critical scenarios of IoT, IIoT, connected vehicles, and more, including over 70 Fortune 500 companies like HPE, VMware, Verifone, SAIC Volkswagen, and Ericsson.
For more information, please visit EMQX homepage.
Get Started
Run EMQX in the Cloud
The simplest way to set up EMQX is to create a managed deployment with EMQX Cloud. You can try EMQX Cloud for free, no credit card required.
Run EMQX using Docker
docker run -d --name emqx -p 1883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx/emqx:latest
Next, please follow the getting started guide to tour the EMQX features.
Run EMQX cluster on kubernetes
For details: EMQX Operator.
More installation options
If you prefer to install and manage EMQX yourself, you can download the latest version from www.emqx.io/downloads.
For more installation options, see the EMQX installation documentation.
Documentation
The EMQX documentation is available at www.emqx.io/docs/en/latest/.
The EMQX Enterprise documentation is available at docs.emqx.com/en/.
Contributing
Please see our contributing.md.
For more organised improvement proposals, you can send pull requests to EIP.
Get Involved
- Follow @EMQTech on Twitter.
- Join our Slack.
- If you have a specific question, check out our discussion forums.
- For general discussions, join us on the official Discord team.
- Keep updated on EMQX YouTube by subscribing.
Resources
-
A series of blogs to help developers get started quickly with MQTT in PHP, Node.js, Python, Golang, and other programming languages.
-
We have selected popular MQTT client SDKs in various programming languages and provided code examples to help you quickly understand the use of MQTT clients.
-
An elegant cross-platform MQTT 5.0 client tool that provides desktop, command line, and web to help you develop and debug MQTT services and applications faster.
-
Build a reliable, efficient, and industry-specific IoV platform based on EMQ's practical experience, from theoretical knowledge such as protocol selection to practical operations like platform architecture design.
Build From Source
The master branch is for the latest version 5 release, checkout main-v4.4 for version 4.4.
EMQX requires OTP 24 for 4.4, 5.0 can be built with OTP 24 or 25.
git clone https://github.com/emqx/emqx.git
cd emqx
make
_build/emqx/rel/emqx/bin/emqx console
For 4.2 or earlier versions, release has to be built from another repo.
git clone https://github.com/emqx/emqx-rel.git
cd emqx-rel
make
_build/emqx/rel/emqx/bin/emqx console
License
See LICENSE.