Fixes https://emqx.atlassian.net/browse/EMQX-11771
For the same reasons as we inject `emqx_bridge_*` applications as dependencies to
`emqx_bridge` when starting the node. Already configured connectors are started when
`emqx_connector` application starts, and may lead to crashes and noise in the logs. One
example is to configure a mongodb bridge and restart the node.
fix({action,connector}_schema): fix `resource_opts` subfields for connectors and actions, and remove redundant subfields from actions, use query mode from actions
Even though most of the time these modules will be used by
connectors, there are exceptions (namely, `emqx_rule_engine`).
Besides, they are general enough to land there, more so given
that `emqx_placeholder` is already there.
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
Co-authored-by: Stefan Strigler <stefan.strigler@emqx.io>
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
Several bridges should be able to share a connector pool defined by a
single connector. The connectors should be possible to enable and
disable similar to how one can disable and enable bridges. There should
also be an API for checking the status of a connector and for
add/edit/delete connectors similar to the current bridge API.
Issues:
https://emqx.atlassian.net/browse/EMQX-10805
```
=CRASH REPORT==== 10-Oct-2023::05:35:30.911371 ===
crasher:
initial call: ehttpc:init/1
pid: <0.23358.2>
registered_name: []
exception error: bad argument
in function persistent_term:get/1
called as persistent_term:get({emqx_bridge_http_SUITE,
do_t_async_retries,attempts})
*** argument 1: no persistent term stored with this key
in call from emqx_bridge_http_SUITE:'-do_t_async_retries/3-fun-2-'/0 (/__w/emqx/emqx/apps/emqx_bridge_http/test/emqx_bridge_http_SUITE.erl, line 697)
in call from emqx_bridge_http_SUITE:'-do_t_async_retries/3-fun-4-'/6 (/__w/emqx/emqx/apps/emqx_bridge_http/test/emqx_bridge_http_SUITE.erl, line 705)
```