We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e01dc98 commit 7ba04a6Copy full SHA for 7ba04a6
src/rabbit_binding.erl
@@ -255,9 +255,14 @@ list(VHostPath) ->
255
destination = VHostResource,
256
_ = '_'},
257
258
- implicit_bindings(VHostPath) ++
259
- [B || #route{binding = B} <- mnesia:dirty_match_object(rabbit_route,
260
- Route)].
+ %% if there are any default exchange bindings left after an upgrade
+ %% of a pre-3.8 database, filter them out
+ AllBindings = [B || #route{binding = B} <- mnesia:dirty_match_object(rabbit_route,
261
+ Route)],
262
+ Filtered = lists:filter(fun(#binding{source = S}) ->
263
+ S =/= ?DEFAULT_EXCHANGE(VHostPath)
264
+ end, AllBindings),
265
+ implicit_bindings(VHostPath) ++ Filtered.
266
267
list_for_source(?DEFAULT_EXCHANGE(VHostPath)) ->
268
implicit_bindings(VHostPath);
0 commit comments