We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{"path1" { "regex11" : "filter1", "regex21": "filter2" }, "path2": { "regex21": "filter3" }, ... }
filter收集到msg后,预期其为json结构的字符串,将其解析成对象。 之后循环对每一个path 进行 取出该jsonpath(不支持数组,可以支持对象属性)的值 循环对该path下每个regex 做正则匹配,如果匹配上,则 调用指定filter 一个消息可以循环匹配多次,对多个path和path内的多个正则,都可触发指定filter 如果一次都没匹配到,且默认的default next filter不为空,则触发默认下级filter
msg如下
{ "groupId": "", "fromUser": "wxid_111", "content": "hi" }
filter设置如下
{"groupId": { "": "4704034b-b2cf-4daa-8912-7bd34c87a416" }, "fromUser" : { "wxid_111" : "4704034b-b2cf-4daa-8912-7bd34c87a416" }, "content": { "i" : "4704034b-b2cf-4daa-8912-7bd34c87a416" }}
匹配命中如下
[FILTER DEBUG][测试KVRouter_with_regex][content][i] filled [FILTER DEBUG][测试KVRouter_with_regex][groupId][] filled [FILTER DEBUG][测试KVRouter_with_regex][fromUser][wxid_111] filled
The text was updated successfully, but these errors were encountered:
No branches or pull requests
KVRouter
msg如下
filter设置如下
匹配命中如下
The text was updated successfully, but these errors were encountered: