Skip to content

Commit f5d4971

Browse files
committed
Allow setting a different license for Tanzu RabbitMQ
1 parent 7d7d5ec commit f5d4971

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
@@ -1513,7 +1513,8 @@ product_name() ->
15131513

15141514
-spec product_license_line() -> string().
15151515
product_license_line() ->
1516-
application:get_env(rabbit, license_line, ?INFORMATION_MESSAGE).
1516+
{ok, Val} = application:get_env(rabbit, license_line),
1517+
Val.
15171518

15181519
-spec product_version() -> string().
15191520

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
@@ -1413,7 +1413,7 @@ handle_frame_pre_auth(Transport,
14131413
<<"cluster_name">> => rabbit_nodes:cluster_name(),
14141414
<<"platform">> => rabbit_misc:platform_and_version(),
14151415
<<"copyright">> => ?COPYRIGHT_MESSAGE,
1416-
<<"information">> => ?INFORMATION_MESSAGE}),
1416+
<<"information">> => rabbit:product_license_line()}),
14171417
ServerProperties =
14181418
maps:map(fun(_, V) -> rabbit_data_coercion:to_binary(V) end,
14191419
ServerProperties0),

0 commit comments

Comments
 (0)