首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >EMQX emqx_web_hook高级配置

EMQX emqx_web_hook高级配置
EN

Stack Overflow用户
提问于 2018-12-11 19:20:20
回答 1查看 416关注 0票数 0

在EMQX软件中,如果我使用"web_hook插件“并尝试选择”高级配置“,如果我只为接收到的消息选择web挂钩,则需要填写两个字段:

代码语言:javascript
复制
+--------------------------------------------+
|  web.hook.rule.message.publish.$name       |
+--------------------------------------------+
 


+---------------------------------------------+
|                 web.hook.api.url            |
+---------------------------------------------+

第二个字段对我来说是可以的……它是将请求重定向到的API URL,但是我必须在第一个字段“web.hook.rule.message.Publisher.$name”中插入什么??

L.

EN

回答 1

Stack Overflow用户

发布于 2019-08-31 16:54:26

请查看emqx_web_hook.conf以获取详细信息。

如下所示:

代码语言:javascript
复制
web.hook.api.url = http://127.0.0.1:8080
## Encode message payload field
##
## Value: base64 | base62
##
## Default: undefined
## web.hook.encode_payload = base64

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.deliver.1    = {"action": "on_message_deliver"}
web.hook.rule.message.acked.1        = {"action": "on_message_acked"}

$name是一个变量,可以是任何字符串,即上面例子中的1

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53723060

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档