File: rabbitmq_stomp.schema

package info (click to toggle)
rabbitmq-server 4.0.5-9
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 38,056 kB
  • sloc: erlang: 257,826; javascript: 22,466; sh: 3,037; makefile: 2,517; python: 1,966; xml: 646; cs: 335; java: 244; ruby: 212; php: 100; perl: 63; awk: 13
file content (249 lines) | stat: -rw-r--r-- 8,603 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
%%
%% Copyright (c) 2007-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
%%

%% ==========================================================================
%% ----------------------------------------------------------------------------
%% RabbitMQ Stomp Adapter
%%
%% See https://www.rabbitmq.com/stomp.html for details
%% ----------------------------------------------------------------------------

%  {rabbitmq_stomp,
%   [%% Network Configuration - the format is generally the same as for the broker

%% Listen only on localhost (ipv4 & ipv6) on a specific port.
%% {tcp_listeners, [{"127.0.0.1", 61613},
%%                  {"::1",       61613}]},

{mapping, "stomp.listeners.tcp", "rabbitmq_stomp.tcp_listeners",[
    {datatype, {enum, [none]}}
]}.

{mapping, "stomp.listeners.tcp.$name", "rabbitmq_stomp.tcp_listeners",[
    {datatype, [integer, ip]}
]}.

{translation, "rabbitmq_stomp.tcp_listeners",
fun(Conf) ->
    case cuttlefish:conf_get("stomp.listeners.tcp", Conf, undefined) of
        none -> [];
        _ ->
            Settings = cuttlefish_variable:filter_by_prefix("stomp.listeners.tcp", Conf),
            [ V || {_, V} <- Settings ]
    end
end}.

{mapping, "stomp.tcp_listen_options", "rabbitmq_stomp.tcp_listen_options", [
    {datatype, {enum, [none]}}]}.

{translation, "rabbitmq_stomp.tcp_listen_options",
fun(Conf) ->
    case cuttlefish:conf_get("stomp.tcp_listen_options", Conf, undefined) of
        none -> [];
        _    -> cuttlefish:invalid("Invalid stomp.tcp_listen_options")
    end
end}.

{mapping, "stomp.tcp_listen_options.backlog", "rabbitmq_stomp.tcp_listen_options.backlog", [
    {datatype, integer}
]}.

{mapping, "stomp.tcp_listen_options.nodelay", "rabbitmq_stomp.tcp_listen_options.nodelay", [
    {datatype, {enum, [true, false]}}
]}.

{mapping, "stomp.tcp_listen_options.buffer", "rabbitmq_stomp.tcp_listen_options.buffer",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.delay_send", "rabbitmq_stomp.tcp_listen_options.delay_send",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "stomp.tcp_listen_options.dontroute", "rabbitmq_stomp.tcp_listen_options.dontroute",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "stomp.tcp_listen_options.exit_on_close", "rabbitmq_stomp.tcp_listen_options.exit_on_close",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "stomp.tcp_listen_options.fd", "rabbitmq_stomp.tcp_listen_options.fd",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.high_msgq_watermark", "rabbitmq_stomp.tcp_listen_options.high_msgq_watermark",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.high_watermark", "rabbitmq_stomp.tcp_listen_options.high_watermark",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.keepalive", "rabbitmq_stomp.tcp_listen_options.keepalive",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "stomp.tcp_listen_options.low_msgq_watermark", "rabbitmq_stomp.tcp_listen_options.low_msgq_watermark",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.low_watermark", "rabbitmq_stomp.tcp_listen_options.low_watermark",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.port", "rabbitmq_stomp.tcp_listen_options.port",
    [{datatype, integer}, {validators, ["port"]}]}.

{mapping, "stomp.tcp_listen_options.priority", "rabbitmq_stomp.tcp_listen_options.priority",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.recbuf", "rabbitmq_stomp.tcp_listen_options.recbuf",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.send_timeout", "rabbitmq_stomp.tcp_listen_options.send_timeout",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.send_timeout_close", "rabbitmq_stomp.tcp_listen_options.send_timeout_close",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "stomp.tcp_listen_options.sndbuf", "rabbitmq_stomp.tcp_listen_options.sndbuf",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.tos", "rabbitmq_stomp.tcp_listen_options.tos",
    [{datatype, integer}]}.

{mapping, "stomp.tcp_listen_options.linger.on", "rabbitmq_stomp.tcp_listen_options.linger",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "stomp.tcp_listen_options.linger.timeout", "rabbitmq_stomp.tcp_listen_options.linger",
    [{datatype, integer}, {validators, ["non_negative_integer"]}]}.

{translation, "rabbitmq_stomp.tcp_listen_options.linger",
fun(Conf) ->
    LingerOn = cuttlefish:conf_get("stomp.tcp_listen_options.linger.on", Conf, false),
    LingerTimeout = cuttlefish:conf_get("stomp.tcp_listen_options.linger.timeout", Conf, 0),
    {LingerOn, LingerTimeout}
end}.


%%
%% TLS
%%

{mapping, "stomp.listeners.ssl", "rabbitmq_stomp.ssl_listeners",[
    {datatype, {enum, [none]}}
]}.

{mapping, "stomp.listeners.ssl.$name", "rabbitmq_stomp.ssl_listeners",[
    {datatype, [integer, ip]}
]}.

{translation, "rabbitmq_stomp.ssl_listeners",
fun(Conf) ->
    case cuttlefish:conf_get("stomp.listeners.ssl", Conf, undefined) of
        none -> [];
        _ ->
            Settings = cuttlefish_variable:filter_by_prefix("stomp.listeners.ssl", Conf),
            [ V || {_, V} <- Settings ]
    end
end}.

%% Number of Erlang processes that will accept connections for the TCP
%% and SSL listeners.
%%
%% {num_tcp_acceptors, 10},
%% {num_ssl_acceptors, 10},

{mapping, "stomp.num_acceptors.ssl", "rabbitmq_stomp.num_ssl_acceptors", [
    {datatype, integer}
]}.

{mapping, "stomp.num_acceptors.tcp", "rabbitmq_stomp.num_tcp_acceptors", [
    {datatype, integer}
]}.

%% Additional TLS options

%% Extract a name from the client's certificate when using TLS.
%%
%% Defaults to true.

{mapping, "stomp.ssl_cert_login", "rabbitmq_stomp.ssl_cert_login",
    [{datatype, {enum, [true, false]}}]}.

%% Set a default user name and password. This is used as the default login
%% whenever a CONNECT frame omits the login and passcode headers.
%%
%% Please note that setting this will allow clients to connect without
%% authenticating!
%%
%% {default_user, [{login,    "guest"},
%%                 {passcode, "guest"}]},

{mapping, "stomp.default_vhost", "rabbitmq_stomp.default_vhost", [
    {datatype, string}
]}.

{translation, "rabbitmq_stomp.default_vhost",
fun(Conf) ->
    list_to_binary(cuttlefish:conf_get("stomp.default_vhost", Conf, "/"))
end}.

{mapping, "stomp.default_user", "rabbitmq_stomp.default_user.login", [
    {datatype, string}
]}.

{mapping, "stomp.default_pass", "rabbitmq_stomp.default_user.passcode", [
    {datatype, string}
]}.

{mapping, "stomp.default_topic_exchange", "rabbitmq_stomp.default_topic_exchange", [
    {datatype, string}
]}.

{translation, "rabbitmq_stomp.default_topic_exchange",
fun(Conf) ->
    list_to_binary(cuttlefish:conf_get("stomp.default_topic_exchange", Conf, "amq.topic"))
end}.

%% If a default user is configured, or if x.509
%% certificate-based client authentication is used, use this setting to allow clients to
%% omit the CONNECT frame entirely. If set to true, the client is
%% automatically connected as the default user or user supplied in the
%% x.509/TLS certificate whenever the first frame sent on a session is not a
%% CONNECT frame.
%%
%% Defaults to true.

{mapping, "stomp.implicit_connect", "rabbitmq_stomp.implicit_connect",
    [{datatype, {enum, [true, false]}}]}.

{mapping, "stomp.login_timeout", "rabbitmq_stomp.login_timeout",
    [{datatype, integer}, {validators, ["non_negative_integer"]}]}.

%% Whether or not to enable proxy protocol support.
%%
%% Defaults to false.

{mapping, "stomp.proxy_protocol", "rabbitmq_stomp.proxy_protocol",
    [{datatype, {enum, [true, false]}}]}.

%% Whether or not to hide server info
%%
%% Defaults to false.

{mapping, "stomp.hide_server_info", "rabbitmq_stomp.hide_server_info",
    [{datatype, {enum, [true, false]}}]}.

%% Whether or not to always requeue the message on nack
%% If not set then coordinated by the usage of the frame "requeue" header
%% Useful when you are not fully controlling the STOMP consumer implementation
%%
%% Defaults to true.

{mapping, "stomp.default_nack_requeue", "rabbitmq_stomp.default_nack_requeue",
    [{datatype, {enum, [true, false]}}]}.



%% Maximum frame size.
%%
%% Defaults to 192Kb.

{mapping, "stomp.max_frame_size", "rabbitmq_stomp.max_frame_size",
    [{datatype, integer}, {validators, ["non_negative_integer"]}]}.