<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:int-ip="http://www.springframework.org/schema/integration/ip"
	xmlns:int="http://www.springframework.org/schema/integration"
	xsi:schemaLocation="http://www.springframework.org/schema/integration/ip https://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">


	<int:channel id="in"/>

	<int:channel id="dummy">
		<int:queue />
	</int:channel>

	<int-ip:tcp-connection-factory id="server"
		type="server"
		using-nio="true"
		port="0"
		local-address="localhost"
		lookup-host="false"
		so-timeout="20000"
	/>

	<int-ip:tcp-connection-factory id="client1"
		type="client"
		host="localhost"
		port="#{server.port}"
		lookup-host="false"
		so-timeout="100000"
	/>

	<int-ip:tcp-inbound-gateway id="servergw"
		request-channel="dummy"
		connection-factory="server"/>

	<int-ip:tcp-inbound-channel-adapter
		id="tcpIn"
		connection-factory="client1"
		channel="in"
		retry-interval="1000"
		client-mode="true"
		auto-startup="false" />

	<int:channel id="cbChannel" />

	<int:control-bus input-channel="cbChannel" />

	<int:gateway default-request-channel="cbChannel"
		service-interface="org.springframework.integration.ip.tcp.ClientModeControlBusTests$ControlBus"/>

</beans>
