Git Product home page Git Product logo

blog's Introduction

English | 简体中文 | Русский

EMQX

GitHub Release Build Status Coverage Status Docker Pulls OpenSSF Scorecard Slack Discord Twitter YouTube

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 Deploy with Docker guide for further instructions.

Run EMQX cluster on Kubernetes

Please consult official EMQX Operator documentation for details.

Run EMQX on macOS

EMQX is available as core Homebrew package.

brew install emqx
emqx start

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

Resources

  • MQTT client programming

    A series of blogs to help developers get started quickly with MQTT in PHP, Node.js, Python, Golang, and other programming languages.

  • MQTT SDKs

    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.

  • MQTTX

    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.

  • Internet of Vehicles

    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 tracks the latest version 5. For version 4.4 checkout the main-v4.4 branch.

EMQX 4.4 requires OTP 24. EMQX 5.0 ~ 5.3 can be built with OTP 24 or 25. EMQX 5.4 and newer can be built with OTP 25 or 26.

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.

blog's People

Contributors

0721betty avatar alicezhao6 avatar alvin1221 avatar chynkm avatar crazywisdom avatar dingiso avatar emqplus avatar emqx-ci-robot avatar kingjie0210 avatar lyric09220 avatar mattbrittan avatar mgamer avatar qwerty9288 avatar red-asuka avatar swilder-m avatar tianxuli avatar tigercl avatar wivwiv avatar wwhai avatar xl-yibai avatar ysfscream avatar zeeshan-ks avatar zhiw avatar zibuyu1995 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog's Issues

请问如何直接使用mqtt协议进行连接

const options = { host: 'broker.emqx.io', port: 8083, path: '/testTopic', id: 'id_' + parseInt(Math.random() * 100000), useSSL: false, };

我看到代码里面使用的是8083端口号,使用的是websocket进行了链接,我想问的是如何配置mqtt端口号进行连接呢

Useless ingress.yaml

File: /zh/202012/access-emqx-in-kubernetes-cluster-through-nginx-ingress-controller.md

This is useless, tarffic won't pass through ingress.

# ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
  name: emqx
spec:
  rules:
  - host: emqx.cn.iotdp.cn
    http:
      paths:
      - backend:
          serviceName: my-emqx
          servicePort: 18083
        path: /
      - backend:
          serviceName: my-emqx
          servicePort: 8083
        path: /mqtt

编译jwt时报错

File: /zh/202212/how-to-cross-compile-neuron-source-code.md

报错如下:
root@100ask:/opt/module/libjwt/build# make
[ 12%] Building C object libjwt/CMakeFiles/jwt.dir/jwt-openssl.c.o
In file included from /usr/include/openssl/bio.h:13:0,
from /opt/module/libjwt/libjwt/jwt-openssl.c:12:
/usr/include/openssl/e_os2.h:13:11: fatal error: openssl/opensslconf.h: No such file or directory

include <openssl/opensslconf.h>

HAProxy+emqx集群, ssl连接使用`listener.ssl.external.peer_cert_as_username=dn`配置失效

File: /zh/202101/emqx-haproxy.md

问题描述

按照文档,成功部署了,HAProxy + emqx的集群. tcp和ssl连接都能正常使用.
但是碰到一个问题: 不使用集群直连时可以通过配置文件中的listener.ssl.external.peer_cert_as_username = dn 配置项, 以证书中的SubAltName做为客户端username. 但是通过HAProxy, 使用ssl连接时,username并不是 证书中的字段, 仍然是client连接时的原始username.

环境

系统为uos基于Linux version 4.19.0-desktop-amd64
emqx版本为emqx-ubuntu18.04-4.3.3-amd64.deb
HAProxy 版本 2.4.0

haproxy配置方式:

backend backend_emqx_ssl
mode tcp
balance roundrobin
server emqx_node_1 10.4.17.134:8883 check-send-proxy send-proxy-v2 check inter 10s fall 2 rise 5
server emqx_node_2 10.4.17.141:8883 check-send-proxy send-proxy-v2 check inter 10s fall 2 rise 5
frontend frontend_emqx_ssl
bind *:8005
option tcplog
mode tcp
default_backend backend_emqx_ssl
(剩余配置略)

是否需要在emqx中做额外配置?或者在HAProxy做配置,让emqx broker能正确解析证书字段?

希望尽快回复,谢谢.

SSL/TLS 双向连接的启用及验证

File: /zh/202007/enable-two-way-ssl-for-emqx.md

文中开启TLS双向验证,EMQX配置文件需修改配置,校验客户端是否传证书文件。

Used together with {verify, verify_peer} by an SSL server. If set to true,

the server fails if the client does not have a certificate to send, that is,

sends an empty certificate.

Value: true | false

listener.ssl.external.fail_if_no_peer_cert = true

此配置默认注释,文中未提到此配置需为true。未开启状态下,双向验证客户端未传证书文件也可连接成功。

Incorrect claims about AWS IoT Core

Hello. This blog has some claims that could do with correction: https://github.com/emqx/blog/blob/main/en/202309/aws-mqtt-managing-iot-communication-in-aws.md#emqx-cloud-vs-aws-iot-core

Some points:

"MicroPython MQTT Tutorial Based on Raspberry Pi" - Installation of micropython fails

File: /en/202209/micro-python-mqtt-tutorial-based-on-raspberry-pi.md

I am running the 64-bit version of RasPiOS Bullseye. Installation of micropython fails with

pi@rpitest64:~ $ sudo apt install micropython -s
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package micropython
pi@rpitest64:~ $

(apt update has been run immediately prior to this.)

There does not seem to be any trace of 'micropython' in the Debian packages index for any release of Debian.

{Update: I have also tried the 32-bit version of RasPiOS Bullseye with the same (failed) result.}

使用给定的测试脚本jmeter测试出错

File: /zh/202204/the-use-of-jmeter-mqtt-in-subscription-and-publishing-test-scenarios.md
jmeter版本:5.6.2
堆栈:
Aug 01, 2023 5:31:20 PM net.xmeter.samplers.mqtt.hivemq.HiveMQTTClient connect
INFO: Connected client: conn_e1ff2927a3824a3786
Aug 01, 2023 5:31:20 PM net.xmeter.samplers.mqtt.hivemq.HiveMQTTClient connect
INFO: Connected client: conn_a4120c4fbecb4358a6
java.lang.IllegalStateException: Current state = CODING_END, new state = FLUSHED
at java.nio.charset.CharsetDecoder.throwIllegalStateException(CharsetDecoder.java:992)
at java.nio.charset.CharsetDecoder.flush(CharsetDecoder.java:675)
at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:804)
at net.xmeter.samplers.mqtt.hivemq.HiveMQTTConnection.decode(HiveMQTTConnection.java:115)
at net.xmeter.samplers.mqtt.hivemq.HiveMQTTConnection.handlePublishReceived(HiveMQTTConnection.java:108)
at com.hivemq.client.internal.mqtt.mqtt3.Mqtt3AsyncClientView.lambda$callbackView$1(Mqtt3AsyncClientView.java:73)
at com.hivemq.client.internal.mqtt.MqttAsyncClient$CallbackSubscriber.onNext(MqttAsyncClient.java:227)
at com.hivemq.client.internal.mqtt.MqttAsyncClient$CallbackSubscriber.onNext(MqttAsyncClient.java:212)
at com.hivemq.client.rx.FlowableWithSingle$SingleFutureSubscriber.onNext(FlowableWithSingle.java:377)
at com.hivemq.client.internal.rx.operators.FlowableWithSingleCombine$SplitSubscriber$Default.tryOnNextActual(FlowableWithSingleCombine.java:206)
at com.hivemq.client.internal.rx.operators.FlowableWithSingleCombine$SplitSubscriber.tryOnNext(FlowableWithSingleCombine.java:171)
at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync(FlowableObserveOn.java:649)
at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

....
....
Uncaught Exception java.lang.IllegalStateException: Current state = RESET, new state = FLUSHED in thread Thread[RxComputationThreadPool-16,5,main]. See log file for details.
Uncaught Exception java.lang.IllegalStateException: Current state = CODING_END, new state = FLUSHED in thread Thread[RxComputationThreadPool-14,5,main]. See log file for details.
Uncaught Exception java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END in thread Thread[RxComputationThreadPool-11,5,main]. See log file for details.
java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END
at java.nio.charset.CharsetDecoder.throwIllegalStateException(CharsetDecoder.java:992)
at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:572)
at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:802)
at net.xmeter.samplers.mqtt.hivemq.HiveMQTTConnection.decode(HiveMQTTConnection.java:115)
at net.xmeter.samplers.mqtt.hivemq.HiveMQTTConnection.handlePublishReceived(HiveMQTTConnection.java:108)
at com.hivemq.client.internal.mqtt.mqtt3.Mqtt3AsyncClientView.lambda$callbackView$1(Mqtt3AsyncClientView.java:73)
at com.hivemq.client.internal.mqtt.MqttAsyncClient$CallbackSubscriber.onNext(MqttAsyncClient.java:227)
at com.hivemq.client.internal.mqtt.MqttAsyncClient$CallbackSubscriber.onNext(MqttAsyncClient.java:212)
at com.hivemq.client.rx.FlowableWithSingle$SingleFutureSubscriber.onNext(FlowableWithSingle.java:377)
at com.hivemq.client.internal.rx.operators.FlowableWithSingleCombine$SplitSubscriber$Default.tryOnNextActual(FlowableWithSingleCombine.java:206)
at com.hivemq.client.internal.rx.operators.FlowableWithSingleCombine$SplitSubscriber.tryOnNext(FlowableWithSingleCombine.java:171)
at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnConditionalSubscriber.runAsync(FlowableObserveOn.java:649)
at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Disingenuous license comparison

File: /en/202304/emqx-vs-vernemq-2023-mqtt-broker-comparison.md

Calling both EMQX and VerneMQ "Apache License 2.0" in the above blogpost is at best a half truth. In reality EMQX is only partly open-source (it's "opencore" strictly speaking). Basic functionality like persistence is covered under the BUSL license which by itself states: "The Business Source License is not an Open Source license." and says the work is only allowed to be used for "non-production". Not even mentioning there are parts of EMQX which are not opensource is quite frankly just disingenuous.

BTW I'm not affiliated with VerneMQ.

Connection Settings not working

The example provided for connection settings differs from the example shown in the php-mqtt repository (below). The example provided here does not apply the connection settings and therefore any broker expecting a username and password will return an error 5. The emqx broker appears not to need credentials so the example here does run but the Connection Settings are not encoded. This is evident from looking at the Connect packet in Wireshark, where it shows the Connect Flags not correctly set.

$connectionSettings = (new \PhpMqtt\Client\ConnectionSettings)
->setConnectTimeout(3)
->setUseTls(true)
->setTlsSelfSignedAllowed(true);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.