title: Unable to configure "Keep Alive" in Camel HTTP component
body: <p>I'm having some troubles with the right setup of the HTTP component. Currently a microservice pulls JSON Content from a provider, process it and send it to the next service for further processes. The main problem is that this microservice create a ton of CLOSE_WAIT socket connections. I understand that the whole concept of "KEEP-ALIVE" shall keep the connection open until I close it, but it's possible that the server will drop the connection for some reasons and creates this CLOSE_WAIT socket.</p>
  
  <p>I've created a small service for debugging / testing purposes which make a GET Call to Google, but even this connection stays open until i close the program. I've tried many different solutions:</p>
  
  <ul>
  <li>.setHeader("Connection", constant("Close"))</li>
  <li>-Dhttp.keepAlive=false as VM argument</li>
  <li>Switching from Camel-Http to Camel-Http4</li>
  <li>httpClient.soTimeout=500 (Camel-HTTP), httpClient.socketTimeout=500 and connectionTimeToLive=500 (Camel-HTTP4)</li>
  <li>.setHeader("Connection", simple("Keep-Alive")) and 
  .setHeader("Keep-Alive", simple("timeout=10")) (Camel-HTTP4)</li>
  <li>Setting via debugging the response of DefaultConnectionKeepAliveStrategy from -1 (never ending) to a specific value in Camel-HTTP4 - that works but I was not able to inject my own strategy.</li>
  </ul>
  
  <p>but i had no success. So maybe one of you can help me:</p>
  
  <ul>
  <li>How can i tell the Camel-HTTP that it should close a connection when a specific time is passed? For example, the service pulls every hour from the content provider. After 3-4 hours the HttpComponent should close the connection after the pull and reopen it when the next pull is there. Currently every connection would be put back into the MultiThreadedHttpConnectionManager and the socket is still open.</li>
  <li>If it's not possible to do that with Camel-HTTP: How can i inject a HttpClientBuilder into the Creation of my route? I know that it should be possible via httpClient option but I don't understand that specific part of the documentation.</li>
  </ul>
  
  <p>Thank you all for your help</p>