Skip to content

Commit 2e5cb21

Browse files
Handle a case where a DQT is 'quorum' but client-provided props are incompatible
1 parent 1a48bb7 commit 2e5cb21

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

deps/rabbit/src/rabbit_amqqueue.erl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,15 +750,20 @@ augment_declare_args(VHost, Durable, Exclusive, AutoDelete, Args0) ->
750750
case IsPermitted andalso IsCompatible of
751751
true ->
752752
%% patch up declare arguments with x-queue-type if there
753-
%% is a vhost default set the queue is druable and not exclusive
753+
%% is a vhost default set the queue is durable and not exclusive
754754
%% and there is no queue type argument
755755
%% present
756756
rabbit_misc:set_table_value(Args0,
757757
<<"x-queue-type">>,
758758
longstr,
759759
DefaultQueueType);
760760
false ->
761-
Args0
761+
%% if the properties are incompatible with the declared
762+
%% DQT, use the fall back type
763+
rabbit_misc:set_table_value(Args0,
764+
<<"x-queue-type">>,
765+
longstr,
766+
rabbit_queue_type:short_alias_of(rabbit_queue_type:fallback()))
762767
end;
763768
_ ->
764769
Args0

0 commit comments

Comments
 (0)