<?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:si="http://www.springframework.org/schema/integration"
	xmlns:jms="http://www.springframework.org/schema/integration/jms"
	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/integration/jms
			https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd">

	<si:channel id="requestChannel">
		<si:queue capacity="10"/>	
	</si:channel>

	<jms:outbound-gateway id="jmsGateway"
	                      request-destination="requestQueue"
	                      request-channel="requestChannel"
	                      message-converter="converter">
		<si:poller fixed-delay="1000"/>
	</jms:outbound-gateway>

	<bean id="jmsConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory">
		<constructor-arg>
			<bean class="org.springframework.integration.jms.StubConnection">
				<constructor-arg value="test-message"/>
			</bean>
		</constructor-arg>
	</bean>

	<bean id="requestQueue" class="org.springframework.integration.jms.StubQueue"/>
	
	<bean id="converter" class="org.springframework.integration.jms.StubMessageConverter" />

</beans>
