Coder Social home page Coder Social logo

emqx-persistence-plugin's Introduction

emqx_persistence_plugin :Emqx增强插件(非官方)

1.简介

本插件是一个EMQX社区版的持久化数据的增强插件,社区出品,非官方。当前支持EMQX4.0以上版本。

2.配置

配置文件分为两部分:

  1. 持久化的数据源:你要持久化的数据源,一般不要动
  2. Mysql连接配置:MySql客户端配置,IP端口,SSL等

3.安装

参考这里:https://docs.emqx.io/broker/latest/cn/advanced/plugins.html

4.功能介绍

1.Mysql持久化数据

  1. $PERSISTENCE/开头的Topic,发送的任何消息被持久化到Mysql;
  2. 客户端上下线记录持久化到Mysql;

3.点对点消息

Topic满足该规则可被直接发送给某个客户端,而不需要订阅任何Topic。例如直接给ClientId为test1的客户端发送消息,直接在Topic后面加上即可:$P2P/test1

注意事项

  • client_id 不可空
  • $P2P/不可订阅
  • ClientId中不可带非法字符:/ * # +

4.自动追加ClientId

$WITH_CLIENTID/ 开头的Topic,消息Payload会被添加发送方的ClientId,ClientId会被加到Payload最前面以一个 # 分割。 例如A客户端 c1$WITH_CLIENTID/test 发送了一个消息:ok ,如果有客户端订阅,受到的消息为 c1#ok

社区

emqx-persistence-plugin's People

Contributors

wwhai avatar luxingwen 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.