Skip to content

Commit

Permalink
Added global default queue type config
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonUnge committed May 3, 2024
1 parent 1ecaaad commit 2e2bbaf
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 @@ -2511,6 +2511,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 @@ -275,7 +275,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.

-spec to_binary(module()) -> binary().
to_binary(rabbit_classic_queue) ->
Expand Down

0 comments on commit 2e2bbaf

Please sign in to comment.