首页 > 解决方案 > 启用 emq_web_hook 插件后 EMQ 无法连接客户端

问题描述

我正在通过 docker image 运行我的 emqtt 代理。

我正在尝试捕获在我的代理上发布的所有消息以及所有已确认的消息。为此,我尝试使用 emq_web_hook 插件,但是当我从仪表板启用此插件时,客户端断开连接,然后无法再次连接到代理。我用默认配置尝试了这个,比如

web.hook.api.url = http://127.0.0.1

web.hook.rule.client.connected.1     = {"action": "on_client_connected"}
web.hook.rule.client.disconnected.1  = {"action": "on_client_disconnected"}
web.hook.rule.client.subscribe.1     = {"action": "on_client_subscribe"}
web.hook.rule.client.unsubscribe.1   = {"action": "on_client_unsubscribe"}
web.hook.rule.session.created.1      = {"action": "on_session_created"}
web.hook.rule.session.subscribed.1   = {"action": "on_session_subscribed"}
web.hook.rule.session.unsubscribed.1 = {"action": "on_session_unsubscribed"}
web.hook.rule.session.terminated.1   = {"action": "on_session_terminated"}
web.hook.rule.message.publish.1      = {"action": "on_message_publish"}
web.hook.rule.message.delivered.1    = {"action": "on_message_delivered"}
web.hook.rule.message.acked.1        = {"action": "on_message_acked"}

我还更改了 url 并提供了我的节点服务器的 url,但它也不起作用。我的端点从未被调用。

我的仪表板正在工作,但我无法发布。

我做错了什么或者我错过了什么步骤?

我怎样才能捕捉到所有这些事件?

我很困惑。文档不够清楚。

谢谢

标签: mqttemq

解决方案


推荐阅读