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

	<int:inbound-channel-adapter id="withErrorHeader" expression="5/0" channel="serviceChannel" auto-startup="false">
		<int:poller fixed-rate="1000"/>
		<int:header name="eChannel" value="eChannel"/>
	</int:inbound-channel-adapter>
	
	<int:inbound-channel-adapter id="withErrorChannel" expression="5/0" 
					channel="serviceChannel" auto-startup="false">
		<int:poller fixed-rate="1000" error-channel="eChannel"/>
	</int:inbound-channel-adapter>
	
	<int:inbound-channel-adapter id="withErrorChannelAndHeader" expression="5/0" 
					channel="serviceChannel" auto-startup="false">
		<int:poller fixed-rate="1000" error-channel="eChannel"/>
		<int:header name="errorChannel" value="errChannel"/>
	</int:inbound-channel-adapter>
	
	<int:inbound-channel-adapter id="withErrorChannelAndHeaderErrorOnSend" expression="5" 
					channel="serviceChannel" auto-startup="false">
		<int:poller fixed-rate="1000" error-channel="eChannel"/>
		<int:header name="errorChannel" value="errChannel"/>
	</int:inbound-channel-adapter>
	
	<int:channel id="serviceChannel"/>
	
	<int:service-activator input-channel="serviceChannel" expression="payload/0"/>
	
	<int:channel id="serviceWithPollerChannel">
		<int:queue/>
	</int:channel>
	
	<int:service-activator input-channel="serviceWithPollerChannel" expression="5/0">
		<int:poller fixed-rate="1000" error-channel="serviceErrorChannel"/>
	</int:service-activator>
	
	<int:channel id="eChannel">
		<int:queue/>
	</int:channel>
	
	<int:channel id="errChannel">
		<int:queue/>
	</int:channel>
	
	<int:channel id="serviceErrorChannel">
		<int:queue/>
	</int:channel>
</beans>
