Skip to content

Commit

Permalink
Handle a case where a DQT is 'quorum' but client-provided props are i…
Browse files Browse the repository at this point in the history
…ncompatible
  • Loading branch information
michaelklishin committed Jun 24, 2024
1 parent 1a48bb7 commit 2e5cb21
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions deps/rabbit/src/rabbit_amqqueue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -750,15 +750,20 @@ augment_declare_args(VHost, Durable, Exclusive, AutoDelete, Args0) ->
case IsPermitted andalso IsCompatible of
true ->
%% patch up declare arguments with x-queue-type if there
%% is a vhost default set the queue is druable and not exclusive
%% is a vhost default set the queue is durable and not exclusive
%% and there is no queue type argument
%% present
rabbit_misc:set_table_value(Args0,
<<"x-queue-type">>,
longstr,
DefaultQueueType);
false ->
Args0
%% if the properties are incompatible with the declared
%% DQT, use the fall back type
rabbit_misc:set_table_value(Args0,
<<"x-queue-type">>,
longstr,
rabbit_queue_type:short_alias_of(rabbit_queue_type:fallback()))
end;
_ ->
Args0
Expand Down

0 comments on commit 2e5cb21

Please sign in to comment.