Skip to content

Commit 4777861

Browse files
ikavgoLoisSotoLopez
authored andcommitted
use registry:lookup_type_module inside exchange:type_to_module
Without this change delete/3 callback for custom exchange type wasn't called and warning about invalid exchange type appeared in the logs. What is interesting that exchange module was logged as an invalid type for previously declared exchange of that module ¯\_(ツ)_/¯.
1 parent 93be1b3 commit 4777861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit/src/rabbit_exchange.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ invalid_module(T) ->
539539
type_to_module(T) ->
540540
case get({xtype_to_module, T}) of
541541
undefined ->
542-
case rabbit_registry:lookup_module(exchange, T) of
542+
case rabbit_registry:lookup_type_module(exchange, T) of
543543
{ok, Module} -> put({xtype_to_module, T}, Module),
544544
Module;
545545
{error, not_found} -> invalid_module(T)

0 commit comments

Comments
 (0)