Coder Social home page Coder Social logo

danielzy301 / emqx_plugin_kafka Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ultrakid/emqx_plugin_kafka

0.0 0.0 0.0 47 KB

EMQ X Bridge to Kafka Broker based on EMQ X Broker v4.3. 适配emqx v4.3版本的kafka插件

License: Apache License 2.0

Erlang 98.23% Makefile 1.77%

emqx_plugin_kafka's Introduction

适配emqx v4.3版本

更新说明

v4.3.12.7: Release emqx-4.3.12.7-with-kafka · ULTRAKID/emqx_plugin_kafka (github.com)

2022.08.02 新增了是否对publish消息进行base64编码后再kafka转发的配置项publish_base64,发送数据为字节流的时候建议启用该配置。

v4.3.12.6: Release emqx-4.3.12.6-with-kafka · ULTRAKID/emqx_plugin_kafka (github.com)

2022.06.16 将原来的kafka依赖从ekaf替换成kafka4beam/brod

emqx-plugin-template

emqx/emqx-plugin-template at emqx-v4 (github.com) This is a template plugin for the EMQ X broker.

Plugin Config

配置文件模板及说明见etc/emqx_plugin_kafka.config

Authentication and ACL

emqx:hook('client.authenticate', fun ?MODULE:on_client_authenticate/3, [Env]).
emqx:hook('client.check_acl', fun ?MODULE:on_client_check_acl/5, [Env]).

Build the EMQX broker

1. 基于CentOS7.5环境下编译,先安装相关插件
  yum -y install make gcc gcc-c++ glibc-devel glibc-headers kernel-devel kernel-headers m4 ncurses ncurses-devel openssl openssl-devel openssl-libs zlib zlib-devel libselinux-devel xmlto perl git wget
  
  注意:openssl的版本不是1.1.1k,则需要通过源码openssl-1.1.1k.tar.gz来安装openssl
2. 准备Erlang/OTP 22及以上环境

参照Erlang and Elixir Packages Download - Erlang Solutions (erlang-solutions.com) 官网安装方式。

3. 下载EMQX源码

官方源码仓库地址为emqx/emqx: An Open-Source, Cloud-Native, Distributed MQTT Message Broker for IoT. (github.com) ,分支为main-v4.3

本人修改了官方的编译脚本,并且在插件目录里添加了该kafka插件的信息,仓库地址为ULTRAKID/emqx at main-v4.3 (github.com) ,分支为main-v4.3

4. 修改EMQX文件,增加kafka插件

参照emqx/README.md at main-v4.3 · ULTRAKID/emqx (github.com)

注:ULTRAKID/emqx at main-v4.3 (github.com) 仓库内已进行此项修改。

5. 编译EMQX,并且启动EMQX

进入emqx目录,执行make命令,需要保持外网通畅,有条件建议科学上网。

二进制编译命令:make

docker镜像打包:make emqx-docker

License

Apache License Version 2.0

Author

Ultrakid.

EMQ X Team.

emqx_plugin_kafka's People

Contributors

caijinpeng1113 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.