While integrating to a TCP endpoint, we created an application using Spring integration TCP where we've a pooled connection using the following beans:
<!-- Pooled Connection factory -->
<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" />
<bean id="cachedClient" class="org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory">
<constructor-arg ref="client" />
<constructor-arg value="${gateway.pool.size}" />
</bean>
Does anyone have a suggestion on how to implement a socket re-connection in case a socket loses the connection?