Skip to content

Commit f8f0046

Browse files
mkuratczykmergify[bot]
authored andcommitted
Fix DQT in definition export (redundant property)
The correct place for the `default_queue_type` property is inside the `metadata` block. However, right now we'd always export the value outside of `metadata` AND only export it inside `metadata`, if it was not `undefined`. This value outside of `metadata` was just misleading: if a user exported the definitins from a fresh node, changed `classic` to `quorum` and imported such modified values, the DQT would still be `classic`, because RMQ looks for the value inside `metadata`. Just to make it more confusing, if the DQT was changed successfully one way or another, the value outside of `metadata` would reflect that (it always shows the correct value, but is ignored on import). (cherry picked from commit 73da2a3)
1 parent 4703c1c commit f8f0046

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

deps/rabbit/src/rabbit_definitions.erl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,12 +1081,10 @@ list_vhosts() ->
10811081

10821082
vhost_definition(VHost) ->
10831083
Name = vhost:get_name(VHost),
1084-
DQT = rabbit_queue_type:short_alias_of(rabbit_vhost:default_queue_type(Name)),
10851084
#{
10861085
<<"name">> => Name,
10871086
<<"limits">> => vhost:get_limits(VHost),
1088-
<<"metadata">> => vhost:get_metadata(VHost),
1089-
<<"default_queue_type">> => DQT
1087+
<<"metadata">> => vhost:get_metadata(VHost)
10901088
}.
10911089

10921090
list_users() ->

0 commit comments

Comments
 (0)