Skip to content

Commit cb6d233

Browse files
committed
Allow setting a different license for Tanzu RabbitMQ
(cherry picked from commit 66e158f)
1 parent d78ada1 commit cb6d233

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

deps/rabbit/src/rabbit.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,8 @@ product_name() ->
14671467

14681468
-spec product_license_line() -> string().
14691469
product_license_line() ->
1470-
application:get_env(rabbit, license_line, ?INFORMATION_MESSAGE).
1470+
{ok, Val} = application:get_env(rabbit, license_line),
1471+
Val.
14711472

14721473
-spec product_version() -> string().
14731474

deps/rabbit/src/rabbit_reader.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ server_properties(Protocol) ->
234234
{cluster_name, rabbit_nodes:cluster_name()},
235235
{platform, rabbit_misc:platform_and_version()},
236236
{copyright, ?COPYRIGHT_MESSAGE},
237-
{information, ?INFORMATION_MESSAGE}]]],
237+
{information, rabbit:product_license_line()}]]],
238238

239239
%% Filter duplicated properties in favour of config file provided values
240240
lists:usort(fun ({K1,_,_}, {K2,_,_}) -> K1 =< K2 end,

deps/rabbit_common/include/rabbit.hrl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
%%----------------------------------------------------------------------------
215215

216216
-define(COPYRIGHT_MESSAGE, "Copyright (c) 2007-2026 Broadcom Inc and/or its subsidiaries").
217-
-define(INFORMATION_MESSAGE, "Licensed under the MPL 2.0. Website: https://rabbitmq.com").
218217

219218
%% EMPTY_FRAME_SIZE, 8 = 1 + 2 + 4 + 1
220219
%% - 1 byte of frame type

deps/rabbitmq_stream/src/rabbit_stream_reader.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ handle_frame_pre_auth(Transport,
14171417
<<"cluster_name">> => rabbit_nodes:cluster_name(),
14181418
<<"platform">> => rabbit_misc:platform_and_version(),
14191419
<<"copyright">> => ?COPYRIGHT_MESSAGE,
1420-
<<"information">> => ?INFORMATION_MESSAGE}),
1420+
<<"information">> => rabbit:product_license_line()}),
14211421
ServerProperties =
14221422
maps:map(fun(_, V) -> rabbit_data_coercion:to_binary(V) end,
14231423
ServerProperties0),

0 commit comments

Comments
 (0)