Skip to content

Commit

Permalink
Static shovels remain as they are
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcialRosales authored and michaelklishin committed Jul 24, 2024
1 parent 48f1bc7 commit c24756e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions deps/rabbitmq_shovel/app.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def all_srcs(name = "all_srcs"):

filegroup(
name = "priv",
srcs = ["priv/schema/rabbitmq_shovel.schema"],
)

filegroup(
Expand Down
10 changes: 3 additions & 7 deletions deps/rabbitmq_shovel/src/rabbit_amqp091_shovel.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

-module(rabbit_amqp091_shovel).

-define(APP, rabbitmq_shovel).

-behaviour(rabbit_shovel_behaviour).

-include_lib("amqp_client/include/amqp_client.hrl").
Expand Down Expand Up @@ -45,22 +47,16 @@
-define(MAX_CONNECTION_CLOSE_TIMEOUT, 10000).

parse(_Name, {source, Source}) ->
rabbit_log:debug("shove-091-parse ~p", [Source]),
Prefetch = parse_parameter(prefetch_count, fun parse_non_negative_integer/1,
proplists:get_value(prefetch_count, Source,
?DEFAULT_PREFETCH)),
Queue = parse_parameter(queue, fun parse_binary/1,
proplists:get_value(queue, Source)),
%% TODO parse
CArgs = proplists:get_value(consumer_args, Source, []),
DeclFun = case proplists:get_value(predeclared, Source, false) of
true -> check_fun(Source);
false -> decl_fun(Source)
end,
rabbit_log:debug("shovel-parse-source ~p", [Source]),
#{module => ?MODULE,
uris => proplists:get_value(uris, Source),
resource_decl => DeclFun,
resource_decl => decl_fun(Source),
queue => Queue,
delete_after => proplists:get_value(delete_after, Source, never),
prefetch_count => Prefetch,
Expand Down

0 comments on commit c24756e

Please sign in to comment.