Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1.4
-
None
-
None
-
Can be reproduced on many environments
-
Advanced
Description
We are using Multiple Instances of WebClients (e.g. 200) in parallel. One per Thread.
Each Client is using POST REST-Methods to Call a REST-Service of a Spring-Application (using also CXF on server side for JAX-RS) running in Tomcat.
We experience a retry of the entire HTTP-Message (approx. 20ms offset)
in 0.002 of the messages. We can see this retry on server side and in an TCP-Monitor on client side.
We can not see the retry in the CXF (Debug) Logs. There, we can see exactly one of the requests and one of the responses, as if everything works fine.
Our initialialization of each Client looks the following:
WebClient clientLocal =
WebClient.create(this.propertyManager.get(ProxyPropertiesEnum.WEBSERVICE_ADDRESS, String.class));
ClientConfiguration clientconfig = WebClient.getConfig(clientLocal);
clientconfig.getRequestContext().put(org.apache.cxf.message.Message.MAINTAIN_SESSION, Boolean.TRUE);
clientLocal.path(this.propertyManager.get(ProxyPropertiesEnum.WEBSERVICE_PATH_MESSAGE_PROCESSING, String.class));
clientLocal.type(MEDIA_TYPE_OUTGOING).accept(MEDIA_TYPE_INCOMING);
clientconfig.setSynchronousTimeout(this.propertyManager.get(ProxyPropertiesEnum.TIMEOUT_WEBSERVICE, Long.class));
HTTPConduit conduit1 = (HTTPConduit) clientconfig.getConduit();
HTTPClientPolicy pol = conduit1.getClient();
Long timeout = this.propertyManager.get(ProxyPropertiesEnum.TIMEOUT_WEBSERVICE, Long.class);
pol.setAsyncExecuteTimeout(timeout);
pol.setConnectionTimeout(timeout);
pol.setReceiveTimeout(timeout);
conduit1.setClient(pol);
this.client = clientLocal;