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

	<int:gateway id="optimized" default-request-channel="jmsInOptimized"/>

	<int-jms:outbound-gateway request-channel="jmsInOptimized"
		connection-factory="jmsConnectionFactory"
		request-destination="siOutQueueA"
		reply-destination="siInQueueA"
		receive-timeout="10000"
		correlation-key="JMSCorrelationID">
		<int-jms:reply-listener />
	</int-jms:outbound-gateway>

	<bean id="siOutQueueA" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="siOutQueueA.not.cached"/>
	</bean>

	<bean id="siInQueueA" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="siInQueueA.not.cached"/>
	</bean>

	<!--  -->

	<int:gateway id="nonoptimized" default-request-channel="jmsInNonOptimized"/>

	<int-jms:outbound-gateway request-channel="jmsInNonOptimized"
		connection-factory="jmsConnectionFactory"
		receive-timeout="100"
		request-destination="siOutQueueB"
		reply-destination="siInQueueB">
		<int-jms:reply-listener />
	</int-jms:outbound-gateway>

	<bean id="siOutQueueB" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="siOutQueueB.not.cached"/>
	</bean>

	<bean id="siInQueueB" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="siInQueueB.not.cached"/>
	</bean>

	<!--  -->

	<int:gateway id="optimizedMessageId" default-request-channel="jmsInOptimizedC"/>

	<int-jms:outbound-gateway request-channel="jmsInOptimizedC"
		connection-factory="jmsConnectionFactory"
		request-destination="siOutQueueC"
		receive-timeout="100"
		reply-destination="siInQueueC"
		correlation-key="JMSCorrelationID">
		<int-jms:reply-listener />
	</int-jms:outbound-gateway>

	<bean id="siOutQueueC" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="siOutQueueC.not.cached"/>
	</bean>

	<bean id="siInQueueC" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="siInQueueC.not.cached"/>
	</bean>

	<!--  -->

	<int:gateway id="nonoptimizedMessageId" default-request-channel="jmsInNonOptimizedD"/>

	<int-jms:outbound-gateway request-channel="jmsInNonOptimizedD"
		connection-factory="jmsConnectionFactory"
		request-destination="siOutQueueD"
		receive-timeout="10000"
		reply-destination="siInQueueD">
		<int-jms:reply-listener />
	</int-jms:outbound-gateway>

	<bean id="siOutQueueD" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="siOutQueueD.not.cached"/>
	</bean>

	<bean id="siInQueueD" class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
		<constructor-arg value="siInQueueD.not.cached"/>
	</bean>

	<util:constant id="jmsConnectionFactory"
				   static-field="org.springframework.integration.jms.ActiveMQMultiContextTests.connectionFactory"/>

</beans>
