Java http线程配置没有反映在karaf中
我们使用KARAF容器(4.1.4)并部署了一个rest服务,使用camel cxf发布端点Java http线程配置没有反映在karaf中,java,rest,apache-kafka,apache-camel,camel-cxf,Java,Rest,Apache Kafka,Apache Camel,Camel Cxf,我们使用KARAF容器(4.1.4)并部署了一个rest服务,使用camel cxf发布端点 root@karaf()> cxf:list-endpoints Name │ State │ Address │ BusID ───────────────────────────┼─────────┼───────────────────────────┼────────────────────────────
root@karaf()> cxf:list-endpoints
Name │ State │ Address │ BusID
───────────────────────────┼─────────┼───────────────────────────┼────────────────────────────────────────────────────────────
TestService │ Started │ /PollerService/ │ com.java.test.pack.pollerservice
root@karaf()> http:list
ID │ Servlet │ Servlet-Name │ State │ Alias │ Url
───┼─────────────────────┼────────────────────────────┼─────────────┼───────┼─────────
69 │ CXFNonSpringServlet │ cxf-osgi-transport-servlet │ Deployed │ /test │ [/test/*]
root@karaf()>
服务中一切正常。我们正试图通过将请求数量限制在50(只是一些数字)来实现过载保护。我们尝试在jetty.xml中添加配置,并在etc/org.apache.cxf.workqueues-default.cfg中添加配置文件
使用以下配置
org.apache.cxf.workqueue.default.highWaterMark defines the maximum number of threads.
org.apache.cxf.workqueue.default.lowWaterMark defines the minimum number of threads.
org.apache.cxf.workqueue.default.initialSize defines the initial number of threads.
从源头上。
在这种情况下,两者都不起作用。是否可以按数字更改xml/cfg文件中的配置,以便服务器拒绝过载请求
目的是通过使用配置文件限制请求的数量来保护服务器。我们计划通过实现ContainerRequestFilter来实现这一点。
如有任何建议/链接,将不胜感激