Skip to content

Commit 2358e76

Browse files
committed
Use defaults for durable and auto_delete when importing definitions
Fixes #15128 If a definitions file does not specify `durable` or `auto_delete`, `undefined` is used which wreaks havoc when that exchange is later used in an unbind operation.
1 parent 5c5f7e9 commit 2358e76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deps/rabbit/src/rabbit_definitions.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,8 +882,8 @@ add_exchange_int(Exchange, Name, ActingUser) ->
882882
end,
883883
case rabbit_exchange:declare(Name,
884884
rabbit_exchange:check_type(maps:get(type, Exchange, undefined)),
885-
maps:get(durable, Exchange, undefined),
886-
maps:get(auto_delete, Exchange, undefined),
885+
maps:get(durable, Exchange, true),
886+
maps:get(auto_delete, Exchange, false),
887887
Internal,
888888
args(maps:get(arguments, Exchange, undefined)),
889889
ActingUser) of

0 commit comments

Comments
 (0)