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 73da2a3fbb)
This commit is contained in:
parent
4703c1c3b6
commit
f8f0046fff
|
|
@ -1081,12 +1081,10 @@ list_vhosts() ->
|
|||
|
||||
vhost_definition(VHost) ->
|
||||
Name = vhost:get_name(VHost),
|
||||
DQT = rabbit_queue_type:short_alias_of(rabbit_vhost:default_queue_type(Name)),
|
||||
#{
|
||||
<<"name">> => Name,
|
||||
<<"limits">> => vhost:get_limits(VHost),
|
||||
<<"metadata">> => vhost:get_metadata(VHost),
|
||||
<<"default_queue_type">> => DQT
|
||||
<<"metadata">> => vhost:get_metadata(VHost)
|
||||
}.
|
||||
|
||||
list_users() ->
|
||||
|
|
|
|||
Loading…
Reference in New Issue