Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.5.7, 3.6.2, 4.0.3
-
None
-
Fedora 36, Java 17, cxf 4.0.3
-
Unknown
Description
Hi, I am trying to set custom read timeouts for WS operations in an interceptor:
public class CustomReadTimeoutInterceptor extends AbstractPhaseInterceptor<Message> { ... @Override public void handleMessage(Message message) { message.put(Message.RECEIVE_TIMEOUT, timeoutMillis); } ...
That works well when using the JDK http client, but it does NOT work with the hc5 async client.
It looks like requests issued in parallel affect each others timeout settings.
Download the attached sample project, which contains a CustomReadTimeoutInterceptor and starts two requests in parallel with different timeouts (4 and 2 seconds).
Execute both
mvn
and
mvn -DuseAsync
and compare the output. The output of the first will be like
CLIENT[19]: Duration: 2010 millis CLIENT[29]: Duration: 4211 millis
(which is as expected) whereas the second - using hc5 async - will result in
CLIENT[29]: Duration: 4269 millis CLIENT[19]: Duration: 4012 millis
Now I am wondering if my code is somehow incorrect or if it is cxf's fault...
Attachments
Attachments
Issue Links
- links to