0

in EMQX software if I use "web_hook plugin" and I try to select Advanced Config there are two fields to fill in if I choose web hook only for message received:

+--------------------------------------------+
|  web.hook.rule.message.publish.$name       |
+--------------------------------------------+
 


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

The second field is ok for me ...it's the API URL to redirect the request to but what I have to insert into the first field "web.hook.rule.message.publish.$name" ??

L.

Luca Folin
  • 101
  • 1
  • 8

1 Answers1

0

Check out the emqx_web_hook.conf to get the details.

Like this:

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"}

The $name is a variable which can be any string, i.e 1 in the above example.

Shawn
  • 21
  • 2