From e368afea362a8899514f7913f4dd5d11511d293d Mon Sep 17 00:00:00 2001 From: Feng Date: Thu, 25 Feb 2016 22:37:52 +0800 Subject: [PATCH] supports --- docs/source/getstarted.rst | 39 +++++++++++++++++-------------- docs/source/plugins.rst | 48 ++++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/docs/source/getstarted.rst b/docs/source/getstarted.rst index ce70535f3..cf50de096 100644 --- a/docs/source/getstarted.rst +++ b/docs/source/getstarted.rst @@ -5,21 +5,24 @@ Get Started =========== --------------------- +-------- Overview --------------------- +-------- --------------------- -Goals --------------------- +emqttd is a massively scalable and clusterable MQTT V3.1/V3.1.1 broker written in Erlang/OTP. --------------------- -MQTT Protocol --------------------- +emqttd is aimed to provide a solid, enterprise grade, extensible open-source MQTT broker for IoT, M2M and Mobile applications that need to support ten millions of concurrent MQTT clients. --------------------------- +* Easy to install +* Massively scalable +* Easy to extend +* Solid stable + +----------- Quick Start --------------------------- +----------- + +Download binary packeges for Linux, Mac, FreeBSD and Windows from http://emqtt.io/downloads. .. code:: console @@ -34,9 +37,9 @@ Quick Start # Stop emqttd ./bin/emqttd stop --------------------- -Compile from Source --------------------- +----------------- +Build from Source +----------------- .. code:: console @@ -166,9 +169,9 @@ Test Client sysctl -w net.ipv4.ip_local_port_range="500 65535" echo 1000000 > /proc/sys/fs/nr_open ----------------------------- +---------------------- emqtt Client Libraries ----------------------------- +---------------------- GitHub: https://github.com/emqtt @@ -182,8 +185,8 @@ GitHub: https://github.com/emqtt | `QMQTT`_ | QT MQTT Client | +--------------------+----------------------+ -.. _emqttc: https://github.com/emqtt/emqttc +.. _emqttc: https://github.com/emqtt/emqttc .. _emqtt_benchmark: https://github.com/emqtt/emqtt_benchmark -.. _CocoaMQTT: https://github.com/emqtt/CocoaMQTT -.. _QMQTT: https://github.com/emqtt/qmqtt +.. _CocoaMQTT: https://github.com/emqtt/CocoaMQTT +.. _QMQTT: https://github.com/emqtt/qmqtt diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst index 071518602..eb6b5ce6b 100644 --- a/docs/source/plugins.rst +++ b/docs/source/plugins.rst @@ -1,9 +1,9 @@ .. _plugins: -============ -Plugin Guide -============ +======= +Plugins +======= The emqttd broker could be extended by plugins. Users could develop plugins to customize authentication, ACL and functions of the broker, or integrate the broker with other systems. @@ -526,7 +526,26 @@ emqttd_plugin_template_app.erl - Register the auth/ACL modules: Register Handlers for Hooks --------------------------- -The plugin could register handlers for hooks. The hooks will be called by the broker when a client connected/disconnected, a topic subscribed/unsubscribed or a message published/delivered. +The plugin could register handlers for hooks. The hooks will be called by the broker when a client connected/disconnected, a topic subscribed/unsubscribed or a message published/delivered: + ++------------------------+-------------+---------------------------------------+ +| Name | Type | Description | ++------------------------+-------------+---------------------------------------+ +| client.connected | foreach | Run when a client connected to the | +| | | broker successfully | ++------------------------+-------------+---------------------------------------+ +| client.subscribe | foldl | Run before a client subscribes topics | ++------------------------+-------------+---------------------------------------+ +| client.subscribe.after | foreach | Run after a client subscribed topics | ++------------------------+-------------+---------------------------------------+ +| client.unsubscribe | foldl | Run when a client unsubscribes topics | ++------------------------+-------------+---------------------------------------+ +| message.publish | foldl | Run when a message is published | ++------------------------+-------------+---------------------------------------+ +| message.acked | foreach | Run when a message is delivered | ++------------------------+-------------+---------------------------------------+ +| client.disconnected | foreach | Run when a client is disconnnected | ++----------------------- +-------------+---------------------------------------+ emqttd_plugin_template.erl for example:: @@ -554,27 +573,6 @@ emqttd_plugin_template.erl for example:: emqttd_broker:hook('message.acked', {?MODULE, on_message_acked}, {?MODULE, on_message_acked, [Env]}). -Hook List: - -+------------------------+-------------+---------------------------------------+ -| Name | Type | Description | -+------------------------+-------------+---------------------------------------+ -| client.connected | foreach | Run when a client connected to the | -| | | broker successfully | -+------------------------+-------------+---------------------------------------+ -| client.subscribe | foldl | Run before a client subscribes topics | -+------------------------+-------------+---------------------------------------+ -| client.subscribe.after | foreach | Run after a client subscribed topics | -+------------------------+-------------+---------------------------------------+ -| client.unsubscribe | foldl | Run when a client unsubscribes topics | -+------------------------+-------------+---------------------------------------+ -| message.publish | foldl | Run when a message is published | -+------------------------+-------------+---------------------------------------+ -| message.acked | foreach | Run when a message is delivered | -+------------------------+-------------+---------------------------------------+ -| client.disconnected | foreach | Run when a client is disconnnected | -+----------------------- +-------------+---------------------------------------+ - Register CLI Modules --------------------