webhook调试问题

在webhook中原来的调试例子中改成
{
“clientid”: “c_emqx”,
“username”: “u_emqx”,
“topic”: “test”,
“ddds”: “1”,
“payload”: “{"msg": "hello"}”
}
执行sql就报错,为啥?

错误报告

400 BAD_REQUEST:Bad Arguments: {“kind”:“validation_error”,“mismatches”:{“ctx_acked”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds”,“unmatched”:“from_clientid,from_username…”},“ctx_bridge_mqtt”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“clientid,ddds…”,“unmatched”:“dup,id…”},“ctx_check_authz_complete”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds,payload”,“unmatched”:“action,authz_source…”},“ctx_connack”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds,payload…”,“unmatched”:“clean_start,connected_at…”},“ctx_connected”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds,payload…”,“unmatched”:“clean_start,connected_at…”},“ctx_delivered”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds”,“unmatched”:“from_clientid,from_username…”},“ctx_disconnected”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds,payload…”,“unmatched”:“disconnected_at,peername…”},“ctx_dropped”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds”,“unmatched”:“id,peerhost…”},“ctx_pub”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds”,“unmatched”:“id,peerhost…”},“ctx_sub”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds”,“unmatched”:“peerhost,publish_received_at…”},“ctx_unsub”:{“kind”:“validation_error”,“path”:“rule_test.context”,“reason”:“unknown_fields”,“unknown”:“ddds”,“unmatched”:“peerhost,publish_received_at…”}},“path”:“rule_test.context”,“reason”:“matched_no_union_member”}

环境

  • EMQX 版本:5.0.11
  • 操作系统版本:ubuntu20.04

这是一个模拟消息发送的模板,只能填写发布消息中可用的字段,所以不能写 ddds, 你可以放到 “payload” 里面:

{
“clientid”: “c_emqx”,
“username”: “u_emqx”,
“topic”: “test”,
“payload”: "{"msg": "hello", "ddds": 1}"
}