fix(emqx_bridge): add required fields

This commit is contained in:
EMQ-YangM 2022-04-22 14:22:22 +08:00
parent 625223c2b5
commit f00854aa9d
1 changed files with 10 additions and 1 deletions

View File

@ -283,7 +283,16 @@ recreate(Type, Name, Conf) ->
#{}). #{}).
create_dry_run(Type, Conf) -> create_dry_run(Type, Conf) ->
Conf0 = Conf#{<<"ingress">> => #{<<"remote_topic">> => <<"t">>}},
Conf0 = Conf#{<<"egress">> =>
#{ <<"remote_topic">> => <<"t">>
, <<"remote_qos">> => 0
, <<"retain">> => true
, <<"payload">> => <<"val">>
},
<<"ingress">> =>
#{ <<"remote_topic">> => <<"t">>
}},
case emqx_resource:check_config(emqx_bridge:resource_type(Type), Conf0) of case emqx_resource:check_config(emqx_bridge:resource_type(Type), Conf0) of
{ok, Conf1} -> {ok, Conf1} ->
emqx_resource:create_dry_run_local(emqx_bridge:resource_type(Type), Conf1); emqx_resource:create_dry_run_local(emqx_bridge:resource_type(Type), Conf1);