Skip to content

Commit

Permalink
Added global default queue type config
Browse files Browse the repository at this point in the history
(cherry picked from commit 2e2bbaf)
(cherry picked from commit 9942db5)
  • Loading branch information
SimonUnge authored and mergify[bot] committed May 4, 2024
1 parent b9857c8 commit 6c79907
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deps/rabbit/priv/schema/rabbit.schema
Original file line number Diff line number Diff line change
Expand Up @@ -2478,6 +2478,10 @@ end}.
end
}.

{mapping, "default_queue_type", "rabbit.default_queue_type", [
{datatype, {enum, [quorum, classic, stream]}}]}.


%%
%% Backing queue version
%%
Expand Down
10 changes: 9 additions & 1 deletion deps/rabbit/src/rabbit_queue_type.erl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,15 @@ feature_flag_name(_) ->
undefined.

default() ->
rabbit_classic_queue.
case rabbit_misc:get_env(rabbit,
default_queue_type,
classic)
of
quorum -> rabbit_quorum_queue;
classic -> rabbit_classic_queue;
stream -> rabbit_stream_queue;
_ -> rabbit_classic_queue
end.

%% is a specific queue type implementation enabled
-spec is_enabled(module()) -> boolean().
Expand Down

0 comments on commit 6c79907

Please sign in to comment.