This commit is contained in:
Feng Lee 2015-06-11 10:23:13 +08:00
parent 63933d891a
commit 53099f2536
3 changed files with 20 additions and 7 deletions

View File

@ -2,6 +2,18 @@
emqttd ChangeLog emqttd ChangeLog
================== ==================
0.9.0-alpha (2015-06-14)
-------------------------
Session
Queue
Alarm
Protocol Compliant
0.8.5-beta (2015-06-10) 0.8.5-beta (2015-06-10)
------------------------- -------------------------

View File

@ -76,8 +76,8 @@ start_servers(Sup) ->
{"emqttd pubsub", {supervisor, emqttd_pubsub_sup}}, {"emqttd pubsub", {supervisor, emqttd_pubsub_sup}},
{"emqttd stats", emqttd_stats}, {"emqttd stats", emqttd_stats},
{"emqttd metrics", emqttd_metrics}, {"emqttd metrics", emqttd_metrics},
%{"emqttd router", emqttd_router},
{"emqttd broker", emqttd_broker}, {"emqttd broker", emqttd_broker},
{"emqttd alarm", emqttd_alarm},
{"emqttd mode supervisor", emqttd_mod_sup}, {"emqttd mode supervisor", emqttd_mod_sup},
{"emqttd bridge supervisor", {supervisor, emqttd_bridge_sup}}, {"emqttd bridge supervisor", {supervisor, emqttd_bridge_sup}},
{"emqttd access control", emqttd_access_control}, {"emqttd access control", emqttd_access_control},

View File

@ -20,7 +20,7 @@
%%% SOFTWARE. %%% SOFTWARE.
%%%----------------------------------------------------------------------------- %%%-----------------------------------------------------------------------------
%%% @doc %%% @doc
%%% simple message queue. %%% Simple message queue.
%%% %%%
%%% Notice that MQTT is not an enterprise messaging queue. MQTT assume that client %%% Notice that MQTT is not an enterprise messaging queue. MQTT assume that client
%%% should be online in most of the time. %%% should be online in most of the time.
@ -45,8 +45,6 @@
peek/1, peek/1,
to_list/1]). to_list/1]).
%% in_r/2, out_r/1,
-define(MAX_LEN, 600). -define(MAX_LEN, 600).
-define(HIGH_WM, 0.6). -define(HIGH_WM, 0.6).
@ -78,9 +76,12 @@ new(Name, Opts) ->
MaxLen = emqttd_opts:g(max_queued_messages, Opts, ?MAX_LEN), MaxLen = emqttd_opts:g(max_queued_messages, Opts, ?MAX_LEN),
HighWM = round(MaxLen * emqttd_opts:g(high_queue_watermark, Opts, ?HIGH_WM)), HighWM = round(MaxLen * emqttd_opts:g(high_queue_watermark, Opts, ?HIGH_WM)),
LowWM = round(MaxLen * emqttd_opts:g(low_queue_watermark, Opts, ?LOW_WM)), LowWM = round(MaxLen * emqttd_opts:g(low_queue_watermark, Opts, ?LOW_WM)),
#mqueue{name = Name, max_len = MaxLen, StoreQos0 = emqttd_opts:g(queue_qos0_messages, Opts, false),
store_qos0 = emqttd_opts:g(queue_qos0_messages, Opts, false), #mqueue{name = Name,
high_watermark = HighWM, low_watermark = LowWM}. max_len = MaxLen,
store_qos0 = StoreQos0,
high_watermark = HighWM,
low_watermark = LowWM}.
name(#mqueue{name = Name}) -> name(#mqueue{name = Name}) ->
Name. Name.