GithubHelp home page GithubHelp logo

cnnu / emqx_backend_redis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erl-go-java/emqx_backend_redis

0.0 0.0 0.0 27 KB

EMQ X Redis Data Save Plugin

License: Apache License 2.0

Erlang 97.44% Makefile 2.56%

emqx_backend_redis's Introduction

emqx_backend_redis

EMQ X Redis Data Save Plugin

Build Plugin

make && make tests

Configure Plugin

File: etc/emqx_backend_redis.conf

##--------------------------------------------------------------------
## Redis Backend Plugin
##--------------------------------------------------------------------
## Redis Server cluster type
## single    Single redis server
## sentinel  Redis cluster through sentinel
## cluster   Redis through cluster
backend.redis.type = single

## Redis server address.
##
## Value: Port | IP:Port
##
## Single Redis Server: 127.0.0.1:6379, localhost:6379
## Redis Sentinel: 127.0.0.1:26379,127.0.0.2:26379,127.0.0.3:26379
## Redis Cluster: 127.0.0.1:6379,127.0.0.2:6379,127.0.0.3:6379
backend.redis.server = 127.0.0.1:6379

## Redis sentinel cluster name.
##
## Value: String
## backend.redis.sentinel = mymaster

## Redis pool size.
##
## Value: Number
backend.redis.pool = 8

## Redis database no.
##
## Value: Number
backend.redis.database = 0

## Redis password.
##
## Value: String
## auth.redis.password =

## Redis query timeout
##
## Value: Duration
## auth.redis.query_timeout = 5s

## 订阅的 Redis channel 名称
backend.redis.channel = mqtt_channel

backend.redis.client_connected_cmd = hmset mqtt:client:%c state 1 online_at %t
backend.redis.client_disconnected_cmd = hmset mqtt:client:%c state 0 offline_at %t

Function

Now,plugin provide a template for redis-store,can store connected/disconnected info to redis, if you have advanced function, can connect, I will update it.

Load Plugin

./bin/emqx_ctl plugins load emqx_backend_redis

Author

erl-go-java.

emqx_backend_redis's People

Contributors

erl-go-java avatar cnnu avatar

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.