title: What is the difference between the RecieveTimeout and SynchronousTimeout in org.apache.cxf.jaxrs.client.WebClient?
body: <p>Let me provide some background on the issue that I'm currently facing and the solution that we are trying to implement as well:</p>
  
  <p>We have currently implemented a REST Client using <code>org.apache.cxf.jaxrs.client.WebClient</code> and with this implementation, we want to set a time-out so that the operations which honestly take time be timed-out gracefully.</p>
  
  <p>Here in this context, we have to spend a lot of time in investigating what timeout options be provided so that the time-consuming operation be gracefully timed out instead of letting the operation to take ages!</p>
  
  <p>We have tried to follow many of the approaches suggested here on StackOverflow to set the time-out as the below which do not serve the purpose (following <a href="https://stackoverflow.com/questions/28319446/how-to-set-timeout-to-jax-rs-client-with-cxf">this</a> question, tried this approach):</p>
  
  <pre><code>HTTPConduit conduit = WebClient.getConfig(webClient).getHttpConduit();
  conduit.getClient().setConnectionTimeout(1000 * 3);
  conduit.getClient().setReceiveTimeout(1000 * 3);
  </code></pre>
  
  <p>Obviously, this didn't work out. And on further digging into the code of <code>WebClient</code> &amp; <code>ClientConfiguration</code> observed that there's another option to give a try (even this didn't work out well). Here's the implementation that I've tried.</p>
  
  <pre><code>ClientConfiguration clientConfiguration = WebClient.getConfig(webClient);
  clientConfiguration.setSynchronousTimeout(90000);    //default value here being 60000, on increasing this - it doesn't take effect
  </code></pre>
  
  <p>Just wanted to understand when and where these timeouts take real effect when we are trying to invoke the respective HTTP GET, POST or PUT actions. I'm extremely confused where these timeouts would affect what operations now!</p>
  
  <p>I know that I can't provide a minimal debuggable code that can be explored, but this should something very basic for any REST implementations (I guess).</p>
  
  <p>Any pointers on this is very much appreciated.</p>