Merge pull request #14648 from rabbitmq/mk-dpc-shovel-fetch-parameters-module-from-registry
Shovel worker: fetch handler module from rabbit_registry
This commit is contained in:
commit
c3b064c704
|
@ -55,9 +55,8 @@ init([Type, Name, Config0]) ->
|
||||||
%% TODO It could handle errors while parsing
|
%% TODO It could handle errors while parsing
|
||||||
%% (i.e. missing predeclared queues) and stop nicely
|
%% (i.e. missing predeclared queues) and stop nicely
|
||||||
%% without long stacktraces
|
%% without long stacktraces
|
||||||
{ok, Conf} = rabbit_shovel_parameters:parse(Name,
|
{ok, Mod} = rabbit_registry:lookup_module(runtime_parameter, shovel),
|
||||||
ClusterName,
|
{ok, Conf} = Mod:parse(Name, ClusterName, Config0),
|
||||||
Config0),
|
|
||||||
Conf
|
Conf
|
||||||
end,
|
end,
|
||||||
?LOG_DEBUG("Initialising a Shovel ~ts of type '~ts'", [human_readable_name(Name), Type]),
|
?LOG_DEBUG("Initialising a Shovel ~ts of type '~ts'", [human_readable_name(Name), Type]),
|
||||||
|
|
Loading…
Reference in New Issue