- clone emq-relx project
git clone https://github.com/emqx/emqx.git
- Add DEPS of the plugin in the Makefile
DEPS += emqx_kafka_bridge
dep_emqx_kafka_bridge = git https://github.com/araditc/emqx_kafka_bridge.git release
- Add load plugin in relx.config
{emqx_kafka_bridge, load},
- Build
cd emq-relx && make
You will have to edit the configurations of the bridge to set the kafka Ip address and port.
Edit the file /emqx_kafka_bridge/etc/emqx_kafka_bridge.config
emqx.kafka.bridge.broker = 172.19.16.67:19092, 172.19.16.68:19092, 172.19.16.69:19092
emqx.kafka.bridge.partition = 10
emqx.kafka.bridge.client.flag = auto_start_producers:true, allow_topic_auto_creation:false, query_api_versions:false
emqx.kafka.bridge.client.integer = reconnect_cool_down_seconds:10
emqx.kafka.bridge.regex = ^(client|device|paas)/products/(\\S+)/devices/(\\S+)/(command)(/\\S+)*$
emqx.kafka.bridge.topic = device:saas_device_downstream, client:saas_client_downstream, paas: paas_sqdata_upstream
emqx.kafka.bridge.hook.client.connected.topic = mqtt_client_connected
emqx.kafka.bridge.hook.client.disconnected.topic = mqtt_client_disconnected
- cd /emqx
- ./bin/emqx start
- ./bin/emqx_ctl plugins load emqx_kafka_bridge