Giter VIP home page Giter VIP logo

gmqtt-proxy-plugin's Introduction

gmqtt-proxy-plugin

It's a plugin created for Gmqtt broker, to make it act like a mqtt proxy, with messages buffering support when the destination broker is down.

How to install

  1. Clone Gmqtt project

  2. Edit plugin_imports.ymlfile in the root directory and add proxy plugin:

packages:
  - admin
  - prometheus
  - federation
  - auth 
  # add proxy plugin in the end of the list
  - proxy 
  1. Edit cmd/gmqttd/default_config.yml file and add proxy plugin:
plugin_order:  
  - prometheus
  - admin
  - federation
  # add proxy plugin here
  - proxy
  1. Go to plugin directory and clone this project:
git clone https://github.com/Oliveirakun/gmqtt-proxy-plugin.git
  1. Rename the directory:
mv gmqtt-proxy-plugin proxy
  1. Go back to root directory and install the plugin dependencies:
go get github.com/eclipse/paho.mqtt.golang
  1. Export an environment variable with the destination broker uri:
export REMOTE_MQTT_BROKER=tcp://127.0.0.1:1884
  1. Run the project:
make run

Routes

Route Description
/v1/toogle?stop=true Stop sending messages to destination broker
/v1/toogle?stop=false Restart sending messages to destination broker
/v1/toogle?stop=false&broker-uri=tcp://127.0.0.1 Restart sending messages to a different broker

LICENSE

Licensed under MIT, see LICENSE

gmqtt-proxy-plugin's People

Contributors

oliveirakun avatar

Stargazers

 avatar

Watchers

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