Coder Social home page Coder Social logo

vernemq_dev's Introduction

VerneMQ: A Distributed MQTT Broker

Build and Smoketest Status Documentation Maintenance GitHub Release Date GitHub last commit Twitter: VerneMQ VerneMQ on Fosstodon

Google group : VerneMQ Users

Old Docker Repo New Docker Repo
Docker Pulls from Old Repo Docker Pulls from New Repo

New: VerneMQ can now use Github Discussions! To join the discussion on features and roadmap, and be part of the VerneMQ Community Team on Github, send us your Github username for an invite! (on Twitter, Slack etc.)

Make sure to visit the new VerneMQ Forum hosted on Erlang Forums. We're happy to discuss any of your questions and ideas around VerneMQ on the Forum too!


VerneMQ is known to be deployed and used in: ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡จ๐Ÿ‡ฆ ๐Ÿ‡ง๐Ÿ‡ท ๐Ÿ‡ฒ๐Ÿ‡ฝ ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡จ๐Ÿ‡ญ ๐Ÿ‡ฉ๐Ÿ‡ฐ ๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡ง๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ท๐Ÿ‡ด ๐Ÿ‡ต๐Ÿ‡น ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡ฑ๐Ÿ‡น ๐Ÿ‡จ๐Ÿ‡ฟ ๐Ÿ‡ธ๐Ÿ‡ฐ ๐Ÿ‡ฆ๐Ÿ‡น ๐Ÿ‡ต๐Ÿ‡ฑ ๐Ÿ‡ณ๐Ÿ‡ด ๐Ÿ‡ธ๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡ณ ๐Ÿ‡ฏ๐Ÿ‡ต ๐Ÿ‡ฎ๐Ÿ‡ฉ ๐Ÿ‡ป๐Ÿ‡ณ ๐Ÿ‡ฐ๐Ÿ‡ท ๐Ÿ‡ฟ๐Ÿ‡ฆ ๐Ÿ‡ฐ๐Ÿ‡ช ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ญ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ท ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡ฆ๐Ÿ‡บ ๐Ÿ‡ณ๐Ÿ‡ฟ ๐Ÿ‡จ๐Ÿ‡ณ ๐Ÿ‡ช๐Ÿ‡ฌ ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ญ๐Ÿ‡บ ๐Ÿ‡ฎ๐Ÿ‡ฑ ๐Ÿ‡ธ๐Ÿ‡ฌ ๐Ÿ‡ฑ๐Ÿ‡ง ๐Ÿ‡ต๐Ÿ‡ญ ๐Ÿ‡ต๐Ÿ‡ฐ ๐Ÿ‡ฒ๐Ÿ‡พ ๐Ÿ‡น๐Ÿ‡ท ๐Ÿ‡น๐Ÿ‡ผ ๐Ÿ‡ฎ๐Ÿ‡ท โ˜๏ธ


VerneMQ Logo

VerneMQ is a high-performance, distributed MQTT message broker. It scales horizontally and vertically on commodity hardware to support a high number of concurrent publishers and consumers while maintaining low latency and fault tolerance. VerneMQ is the reliable message hub for your IoT platform or smart products.

VerneMQ is an Apache2 licensed distributed MQTT broker, developed in Erlang.

MQTT used to stand for MQ Telemetry Transport, but it no longer is an acronym. It is an extremely simple and lightweight publish/subscribe messaging protocol, that was invented at IBM and Arcom (now Eurotech) to connect restricted devices in low bandwidth, high-latency or unreliable networks.

VerneMQ implements the MQTT 3.1, 3.1.1 and 5.0 specifications. Currently the following features are implemented and delivered as part of VerneMQ:

  • QoS 0, QoS 1, QoS 2
  • Basic Authentication and Authorization
  • Bridge Support
  • $SYS Tree for monitoring and reporting
  • TLS (SSL) Encryption
  • Websockets Support
  • Cluster Support
  • Logging (Console, Files, Syslog)
  • Reporting to Graphite
  • Extensible Plugin architecture
  • Multiple Sessions per ClientId
  • Session Balancing
  • Shared subscriptions
  • Message load regulation
  • Message load shedding (for system protection)
  • Offline Message Storage (based on LevelDB)
  • Queue can handle messages FIFO or LIFO style.
  • MongoDB auth & integration
  • Redis auth & integration
  • MySQL auth & integration
  • PostgreSQL auth & integration
  • CockroachDB auth & integration
  • Memcached integration
  • HTTP Webhooks
  • PROXY Protocol v2
  • Administration HTTP API
  • Real-time MQTT session tracing
  • Full multitenancy
  • Cluster status web page

The following features are also applies to MQTT 5.0 clients:

  • Enhanced authentication schemes (AUTH)
  • Message expiration
  • Last Will and Testament delay
  • Shared subscriptions
  • Request/response flow
  • Topic aliases
  • Flow control
  • Subscription flags (Retain as Published, No Local, Retain Handling)
  • Subscriber identifiers
  • All property types are supported: user properties, reason strings, content types etc.

Commercial Support. Binary Packages. Documentation

Below you'll find a basic introduction to building and starting VerneMQ. For more information about the binary package installation, configuration, and administration of VerneMQ, please visit our documentation at VerneMQ Documentation or checkout the product page VerneMQ if you require more information on the available commercial support options.

Community Release Schedule

Next major release: not yet scheduled.

Minor releases: At the end of March, July and November (every 4th month).

Bugfix releases: Usually a bugfix release is released between minor releases or if there's an urgent bugfix pending.

Custom release cycles and releases are available for commercial users.

Quick Start

This section assumes that you have a copy of the VerneMQ source tree. To get started, you need to first build VerneMQ.

Building VerneMQ

Note: VerneMQ requires Erlang/OTP 24-25 and libsnappy-dev installed in your system. You'll also need a C compiler for Eleveldb. (on Debian, you install build-essential, as an example).

Assuming you have a working Erlang installation, building VerneMQ should be as simple as:

$ cd $VERNEMQ
$ make rel

Starting VerneMQ

Once you've successfully built VerneMQ, you can start the server with the following commands:

$ cd $VERNEMQ/_build/default/rel/vernemq
$ bin/vernemq start

If VerneMQ is running it is possible to check the status on http://localhost:8888/status and it should look something like:

Note that the $VERNEMQ/_build/default/rel/vernemq directory is a complete, self-contained instance of VerneMQ and Erlang. It is strongly suggested that you move this directory outside the source tree if you plan to run a production instance.

Important links

Thank you to all our contributors!

contributors

vernemq_dev's People

Contributors

codeadict avatar dergraf avatar ioolkos avatar khodzha avatar larshesel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vernemq_dev's Issues

Can't authorize a publish with postgres

I'm trying to implement auth postgres but I can't authorized publishes.

In a desperate attempt I did this:

-- import default hooks and cache logic
require "auth/auth_commons"
-- import shared database query logic
require "auth/postgres_cockroach_commons"

function auth_on_register(reg)
   return auth_on_register_common(postgres, reg)
end

function auth_on_pub(pub)
    return true
end

pool = "auth_postgres"
config = {
    pool_id = pool,
}

postgres.ensure_pool(config)
hooks = {
    auth_on_register     = auth_on_register,
    auth_on_publish      = auth_on_pub,
    auth_on_subscribe    = auth_on_pub,
    on_unsubscribe       = auth_on_pub,
    on_client_gone       = auth_on_pub,
    on_client_offline    = auth_on_pub,
    on_session_expired   = auth_on_pub,

    auth_on_register_m5  = auth_on_pub,
    auth_on_publish_m5   = auth_on_pub,
    auth_on_subscribe_m5 = auth_on_pub,
}

but still I get

2021-04-14 11:41:59.467 [error] <0.2866.0>@vmq_mqtt_fsm:auth_on_publish:739 can't auth publish [<<"user2">>,{[],<<"b8:27:eb:09:b1:d3">>},1,[<<"devices">>,<<"B184">>,<<"616">>,<<"data">>],<<219,221,204,207,120,1,1,66,20,40,246>>,false] due to not_authorized

what am I missing? auth_on_register works but the others don't.

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.