Open forget99 opened 1 year ago
在多线程环境下,一个请求进入apisix网关,在路由上配置了ext-plugin-pre-req和ext-plugin-post-resp,在执行插件时,filter方法和postFilter执行顺序不是一一对应,导致数据错乱,如何将filter和postFilter通过一个唯一值串联起来呢
"plugins": { "ext-plugin-post-resp": { "allow_degradation": false, "conf": [ { "name": "AuthFilter", "value": "authFilter" } ], "disable": false }, "ext-plugin-pre-req": { "allow_degradation": false, "conf": [ { "name": "AuthFilter", "value": "authFilter" } ], "disable": false } },
can you help me?
@forget99 how about using the request.getRequestId() ?
request.getRequestId()
I test the request id. it's not a tracking solution. and now I encountered the same problem .
Issue description
在多线程环境下,一个请求进入apisix网关,在路由上配置了ext-plugin-pre-req和ext-plugin-post-resp,在执行插件时,filter方法和postFilter执行顺序不是一一对应,导致数据错乱,如何将filter和postFilter通过一个唯一值串联起来呢
"plugins": { "ext-plugin-post-resp": { "allow_degradation": false, "conf": [ { "name": "AuthFilter", "value": "authFilter" } ], "disable": false }, "ext-plugin-pre-req": { "allow_degradation": false, "conf": [ { "name": "AuthFilter", "value": "authFilter" } ], "disable": false } },
can you help me?