Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8282

Set read timeout using netty client

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      Hi,

      I am using cxf-rt-transports-http-netty-client (3.3.6) in order to set a client generated by jaxws using the Netty configuration. I want to set a read timeout in my client configuration because the server's response time is ocasionally too long.

      Connection timeout and Receive timeout are correctly set in the NettyHttpConduit but it looks like the read timeout can not be set. 

      My client configuration is set as follows:

       

      Object client = (new JaxWsProxyFactoryBean()).create();
      
      final Client clientProxy = ClientProxy.getClient(client);
      final HTTPConduit httpConduit = (HTTPConduit) clientProxy.getConduit();
      final HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();             
      
      httpClientPolicy.setAsyncExecuteTimeout(connectTimeout.toMillis());
      httpClientPolicy.setConnectionTimeout(connectTimeout.toMillis());
      httpClientPolicy.setReceiveTimeout(readTimeout.toMillis());
      httpConduit.setClient(httpClientPolicy);
      

       

       

      Attachments

        Issue Links

          Activity

            People

              reta Andriy Redko
              sanorcdel Santiago Orcajo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: