diff --git a/deps/amqp_client/src/rabbit_routing_util.erl b/deps/amqp_client/src/rabbit_routing_util.erl index 6e7ddcb0b72b..6ff51dbfaa31 100644 --- a/deps/amqp_client/src/rabbit_routing_util.erl +++ b/deps/amqp_client/src/rabbit_routing_util.erl @@ -137,17 +137,28 @@ queue_declare_method(#'queue.declare'{} = Method, Type, Params) -> false -> Method#'queue.declare'{auto_delete = true, exclusive = true} end, + %% set the rest of queue.declare fields from Params Method2 = lists:foldl(fun (F, Acc) -> F(Acc, Params) end, Method1, [fun update_queue_declare_arguments/2, fun update_queue_declare_exclusive/2, fun update_queue_declare_auto_delete/2, fun update_queue_declare_nowait/2]), + + Arguments = proplists:get_value(arguments, Params, []), + QueueType = rabbit_amqqueue:get_queue_type(Arguments), + + Method3 = case QueueType of + rabbit_stream_queue -> Method2#'queue.declare'{durable = true, + exclusive = false}; + _ -> Method2 + end, + case {Type, proplists:get_value(subscription_queue_name_gen, Params)} of {topic, SQNG} when is_function(SQNG) -> - Method2#'queue.declare'{queue = SQNG()}; + Method3#'queue.declare'{queue = SQNG()}; {exchange, SQNG} when is_function(SQNG) -> - Method2#'queue.declare'{queue = SQNG()}; + Method3#'queue.declare'{queue = SQNG()}; _ -> - Method2 + Method3 end. diff --git a/deps/rabbitmq_stomp/src/rabbit_stomp_util.erl b/deps/rabbitmq_stomp/src/rabbit_stomp_util.erl index 5c20490091d1..df989597cd01 100644 --- a/deps/rabbitmq_stomp/src/rabbit_stomp_util.erl +++ b/deps/rabbitmq_stomp/src/rabbit_stomp_util.erl @@ -336,7 +336,8 @@ default_params({topic, _}) -> [{exclusive, false}, {auto_delete, true}]; default_params(_) -> - [{durable, false}]. + [{exclusive, true}, + {durable, false}]. string_to_boolean("True") -> true;