From b09fc575b632af0ad235333c28afce35e2f33093 Mon Sep 17 00:00:00 2001 From: Feng Date: Wed, 19 Oct 2016 17:46:04 +0800 Subject: [PATCH] add advanced.rst --- docs/source/advanced.rst | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 docs/source/advanced.rst diff --git a/docs/source/advanced.rst b/docs/source/advanced.rst new file mode 100644 index 000000000..001286f00 --- /dev/null +++ b/docs/source/advanced.rst @@ -0,0 +1,45 @@ + +.. _advanced: + +======== +Advanced +======== + +*EMQ* 2.0-rc.2 release supports `Local Subscription` and `Shared Subscription`. + +------------------ +Local Subscription +------------------ + +The EMQ broker will not create global routes for `Local Subscription`, and only dispatch MQTT messages on local node. + +.. code-block:: shell + + mosquitto_sub -t '$local/topic' + + mosquitto_pub -t 'topic' + +Usage: subscribe a topic with `$local/` prefix. + +------------------- +Shared Subscription +------------------- + +Shared Subscription supports Load balancing to distribute MQTT messages between multiple subscribers in the same group:: + + --------- + | | --Msg1--> Subscriber1 + Publisher--Msg1,Msg2,Msg3-->| EMQ | --Msg2--> Subscriber2 + | | --Msg3--> Subscriber3 + --------- + +Two ways to create a shared subscription: + ++-----------------+-------------------------------------------+ +| Prefix | Examples | ++-----------------+-------------------------------------------+ +| $queue/ | mosquitto_sub -t '$queue/topic | ++-----------------+-------------------------------------------+ +| $share// | mosquitto_sub -t '$share/group/topic | ++-----------------+-------------------------------------------+ +