apisix-java-plugin-runner
apisix-java-plugin-runner copied to clipboard
APISIX Plugin Runner in Java
### Issue description 在路由上配置了一个前置插件ext-plugin-pre-req和后置插件ext-plugin-post-resp,在前置插件中获取请求信息,在后置插件中获取响应信息,在多线程环境下,如何将请求数据串联起来。使用线程id和requestId都会出现错乱。 ### code @Override public void filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) { long requestId = request.getRequestId(); String uuid = UuidUtil.create2(); Thread thread = Thread.currentThread(); thread.setName(uuid); logger.info("【前置拦截过滤器线程名称】:"...
我可以在java插件里面改变上游吗 * 0.4.0
### Issue description I'm accessing the Accept header value in filter and postFilter method. Here's what I've experienced. 1. the client sends accept value as ` `(blank) 2. In the...
Bumps [guava](https://github.com/google/guava) from 30.1.1-jre to 32.0.0-jre. Release notes Sourced from guava's releases. 32.0.0 Maven <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>32.0.0-jre</version> <!-- or, for Android: --> <version>32.0.0-android</version> </dependency> Jar files 32.0.0-jre.jar 32.0.0-android.jar Guava...
### Issue description 如果将filter方法和postFilter方法关联起来,我现在有一个路由配置了ext-plugin-pre-req插件和ext-plugin-post-resp插件,我需要在ext-plugin-pre-req记录接口请求的相关信息(请求路径、请求参数等),需要在ext-plugin-post-resp插件中记录接口的响应信息(响应结果),我测试了一下在没有并发的情况下,就简单的单次调用可以正常记录信息,但是在高并发多个接口同时调用时,ext-plugin-pre-req插件的filter方法和ext-plugin-post-resp插件的postFilter方法不是一 一 对应的,导致我不能正确的记录接口请求中的信息,希望老师帮我看下。please help me! ### Environment * your apisix-java-plugin-runner version ` @Override public void filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) { String uuid = UuidUtil.create2(); Thread...
### Issue description ### Environment * your apisix-java-plugin-runner version 2.10.3 * when i try to open requiredBody , I have error about :" phase_func(): failed to handle RPC_EXTRA_INFO: unsupported info...
### Issue description As I know the plugin is based on the Spring framework. I have configured below in the `application.yaml`: ```yaml redis: url: ${REDIS_URL:redis://localhost:6379} ``` Now, I want to...
### Issue description `PostResponse` by default converts the body to bytes in `UTF-8`. It would be nice to support other charsets. ### Environment * 0.4.0
### Issue description ### Environment * your apisix-java-plugin-runner 0.4 java.lang.IndexOutOfBoundsException: null at java.nio.Buffer.checkIndex(Buffer.java:693) ~[?:?] at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:721) ~[?:?] at com.google.flatbuffers.Table.__vector_len(Table.java:125) ~[flatbuffers-java-2.0.0.jar!/:?] at io.github.api7.A6.HTTPRespCall.Req.headersLength(Req.java:22) ~[A6-0.6.0-RELEASE.jar!/:?] at org.apache.apisix.plugin.runner.PostRequest.getUpstreamHeaders(PostRequest.java:81) ~[apisix-runner-plugin-sdk-0.4.0-SNAPSHOT.jar!/:0.4.0-SNAPSHOT] at com.example.demo.DemoPostFilter.postFilter(DemoPostFilter.java:38) ~[classes!/:0.0.1-SNAPSHOT] at...
### Issue description My final goal is to put variables created in the runner plugin into the elastic logger. ex) step1. make variable in runner plugin and pass variable to...