title: How can I implement a socket reconnection using spring integration TCP?
body: <p>While integrating to a TCP endpoint, we created an application using Spring integration TCP where we've a pooled connection using the following beans:</p>
  
  <pre><code>&lt;!-- Pooled Connection factory --&gt;
  &lt;int-ip:tcp-connection-factory id="client" type="client" host="${gateway.url}" port="${gateway.port}"
      single-use="true" so-timeout="${gateway.socket.timeout}" serializer="appSerializerDeserializer" deserializer="appSerializerDeserializer" /&gt;
  &lt;bean id="cachedClient" class="org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory"&gt;
      &lt;constructor-arg ref="client" /&gt;
      &lt;constructor-arg value="${gateway.pool.size}" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Does anyone have a suggestion on how to implement a socket re-connection in case a socket loses the connection?</p>