Skip to content

Commit 3c61f41

Browse files
committed
Update default queue type in put vhost
- supports updating default queue type in http and when importing definitions
1 parent 6402119 commit 3c61f41

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

deps/rabbit/src/rabbit_vhost.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ update_metadata(Name, Metadata0, ActingUser) ->
252252
Error
253253
end.
254254

255-
-spec update(vhost:name(), binary(), [atom()], rabbit_types:username()) -> rabbit_types:ok_or_error(any()).
256-
update(Name, Description, Tags, ActingUser) ->
257-
Metadata = #{description => Description, tags => Tags},
255+
-spec update(vhost:name(), binary(), [atom()], rabbit_queue_type:queue_type() | 'undefined', rabbit_types:username()) -> rabbit_types:ok_or_error(any()).
256+
update(Name, Description, Tags, DefaultQueueType, ActingUser) ->
257+
Metadata = #{description => Description, tags => Tags, default_queue_type => DefaultQueueType},
258258
update_metadata(Name, Metadata, ActingUser).
259259

260260
-spec delete(vhost:name(), rabbit_types:username()) -> rabbit_types:ok_or_error(any()).
@@ -325,7 +325,7 @@ put_vhost(Name, Description, Tags0, DefaultQueueType, Trace, Username) ->
325325
rabbit_log:debug("Parsed tags ~tp to ~tp", [Tags, ParsedTags]),
326326
Result = case exists(Name) of
327327
true ->
328-
update(Name, Description, ParsedTags, Username);
328+
update(Name, Description, ParsedTags, DefaultQueueType, Username);
329329
false ->
330330
Metadata0 = #{description => Description,
331331
tags => ParsedTags},

0 commit comments

Comments
 (0)