Feng Lee 10 лет назад
Родитель
Сommit
9c30d37c67
2 измененных файлов с 17 добавлено и 4 удалено
  1. 1 1
      rel/files/emqttd.config.development
  2. 16 3
      rel/files/emqttd.config.production

+ 1 - 1
rel/files/emqttd.config.development

@@ -260,7 +260,7 @@
         ]}
     ]},
 
-    %% Erlang System Monitor 
+    %% Erlang System Monitor
     {sysmon, [
 
         %% Long GC

+ 16 - 3
rel/files/emqttd.config.production

@@ -168,17 +168,25 @@
         %% File to store loaded plugin names.
         {loaded_file, "./data/loaded_plugins"}
     ]},
+
     %% Listeners
     {listeners, [
         {mqtt, 1883, [
             %% Size of acceptor pool
             {acceptors, 16},
+
             %% Maximum number of concurrent clients
             {max_clients, 8192},
-            %% Rate Limit. Format is 'burst, rate', Unit is KB/Sec.
-            %% {rate_limit, "10,1"}, %% 10K burst, 1K rate
+
             %% Socket Access Control
             {access, [{allow, all}]},
+
+            %% Connection Options
+            {connopts, [
+                %% Rate Limit. Format is 'burst, rate', Unit is KB/Sec
+                %% {rate_limit, "100,10"} %% 100K burst, 10K rate
+            ]},
+
             %% Socket Options
             {sockopts, [
                 %Set buffer if hight thoughtput
@@ -189,16 +197,21 @@
                 {backlog, 1024}
             ]}
         ]},
+
         {mqtts, 8883, [
             %% Size of acceptor pool
             {acceptors, 4},
+
             %% Maximum number of concurrent clients
             {max_clients, 512},
+
             %% Socket Access Control
             {access, [{allow, all}]},
+
             %% SSL certificate and key files
             {ssl, [{certfile, "etc/ssl/ssl.crt"},
                    {keyfile,  "etc/ssl/ssl.key"}]},
+
             %% Socket Options
             {sockopts, [
                 {backlog, 1024}
@@ -222,6 +235,7 @@
         %%      {backlog, 1024}
         %%  ]}
         %%]},
+
         %% HTTP and WebSocket Listener
         {http, 8083, [
             %% Size of acceptor pool
@@ -259,7 +273,6 @@
         {busy_dist_port, true}
 
     ]}
-
  ]}
 ].