summaryrefslogtreecommitdiff
path: root/priv/schema
diff options
context:
space:
mode:
authorMichael Klishin <michael@clojurewerkz.org>2017-10-21 23:48:08 +0300
committerMichael Klishin <michael@clojurewerkz.org>2017-10-22 05:12:09 +0300
commit4c5ebd99fc3cae32e71d06a761518fe0e221a536 (patch)
treee81a8807d10506f4638da0129be7c5e56b96e15e /priv/schema
parent08700282b7176d62cb262a66eceb576610d66c4d (diff)
downloadrabbitmq-server-git-4c5ebd99fc3cae32e71d06a761518fe0e221a536.tar.gz
Support rabbit.connection_max in Cuttlefish schema
Diffstat (limited to 'priv/schema')
-rw-r--r--priv/schema/rabbit.schema21
1 files changed, 20 insertions, 1 deletions
diff --git a/priv/schema/rabbit.schema b/priv/schema/rabbit.schema
index 734a8a4102..9a0d54a2ad 100644
--- a/priv/schema/rabbit.schema
+++ b/priv/schema/rabbit.schema
@@ -523,10 +523,29 @@ end}.
%% Set the max permissible number of channels per connection.
%% 0 means "no limit".
%%
-%% {channel_max, 128},
+%% {channel_max, 0},
{mapping, "channel_max", "rabbit.channel_max", [{datatype, integer}]}.
+%% Set the max permissible number of client connections per node.
+%% `infinity` means "no limit".
+%%
+%% {connection_max, infinity},
+
+{mapping, "connection_max", "rabbit.connection_max",
+ [{datatype, [{atom, infinity}, integer]}]}.
+
+{translation, "rabbit.connection_max",
+ fun(Conf) ->
+ case cuttlefish:conf_get("connection_max", Conf, undefined) of
+ undefined -> cuttlefish:unset();
+ infinity -> infinity;
+ Val when is_integer(Val) -> Val;
+ _ -> cuttlefish:invalid("should be a non-negative integer")
+ end
+ end
+}.
+
%% Customising Socket Options.
%%
%% See (http://www.erlang.org/doc/man/inet.html#setopts-2) for