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 ¯\_(ツ)_/¯.
This commit is contained in:
Iliia Khaprov - VMware by Broadcom 2025-06-27 10:59:17 +02:00 committed by GitHub
parent cee62dbc96
commit efc80c1482
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -539,7 +539,7 @@ invalid_module(T) ->
type_to_module(T) ->
case get({xtype_to_module, T}) of
undefined ->
case rabbit_registry:lookup_module(exchange, T) of
case rabbit_registry:lookup_type_module(exchange, T) of
{ok, Module} -> put({xtype_to_module, T}, Module),
Module;
{error, not_found} -> invalid_module(T)