Coder Social home page Coder Social logo

emq-web-hook's Introduction

emq_web_hook

EMQ broker plugin to catch broker hooks through webhook.
http://emqtt.io
http://codersgarage.com

Setup

In Makefile
DEPS += emq_web_hook
dep_emq_web_hook = git https://github.com/emqtt/emq-web-hook master
In relx.config
{emq_web_hook, load}
In _rel/emqttd/etc/plugins/emq_web_hook.config
[
  {
    emq_web_hook, [
    {"api_url", "http://127.0.0.1/hooks"},
    {"api_key", "123456"}
  ]
  }
].

API

  • client.connected
{
  "api_key": "123456",
  "action": "client_connected",
  "clientId": "Paho12123123123"
}
  • client.disconnected
{
  "api_key": "123456",
  "action": "client_disconnected",
  "clientId": "Paho12123123123"
}
  • client.subscribe
{
  "api_key": "123456",
  "action": "client_subscribe",
  "clientId": "Paho12123123123",
  "username": "sakib"
}
  • client.unsubscribe
{
  "api_key": "123456",
  "action": "client_unsubscribe",
  "clientId": "Paho12123123123",
  "username": "sakib"
}
  • session.created
{
  "api_key": "123456",
  "action": "session_created",
  "clientId": "Paho12123123123",
  "username": "sakib"
}
  • session.subscribed
{
  "api_key": "123456",
  "action": "session_subscribed",
  "clientId": "Paho12123123123",
  "username": "sakib",
  "topic": "/demo/topic"
}
  • session.unsubscribed
{
  "api_key": "123456",
  "action": "session_unsubscribed",
  "clientId": "Paho12123123123",
  "username": "sakib",
  "topic": "/demo/topic"
}
  • session.terminated
{
  "api_key": "123456",
  "action": "session_terminated",
  "clientId": "Paho12123123123",
  "username": "sakib",
  "reason": "unknown reason"
}
  • message.publish
{
  "api_key": "123456",
  "action": "message_publish",
  "topic": "/demo/topic",
  "message": "Hello World",
  "from": "Paho12123123123"
}
  • message.delivered
{
  "api_key": "123456",
  "action": "message_delivered",
  "topic": "/demo/topic",
  "message": "Hello World",
  "from": "Paho12123123123",
  "username": "sakib"
}
  • message.acknowledged
{
  "api_key": "123456",
  "action": "message_acknowledged",
  "topic": "/demo/topic",
  "message": "Hello World",
  "from": "Paho12123123123",
  "username": "sakib"
}

LICENSE

Copyright © Coders Garage
Distributed under MIT license.

Contributors

emq-web-hook's People

Contributors

s4kibs4mi avatar vishr avatar

Watchers

 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.