<?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"
	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">


	<!-- The name of the queue to which to connect to receive cold drink orders-->
	<bean id="hotDrinksQueue" class="org.apache.activemq.command.ActiveMQQueue">
		<constructor-arg value="org.springframework.integration.samples.cafe.drinks.hot"/>
	</bean>

	<!-- The gateway responsible for request/reply semantics -->
	<int-jms:inbound-gateway request-channel="hotJsonDrinks" request-destination="hotDrinksQueue"/>
	<int:channel id="hotJsonDrinks" />

	<!-- The chain of processing for this barista -->
	<int:chain input-channel="hotJsonDrinks">
		<int:json-to-object-transformer type="org.springframework.integration.samples.cafe.OrderItem"/>
		<int:service-activator method="prepareHotDrink">
			<bean class="org.springframework.integration.samples.cafe.xml.Barista" />
		</int:service-activator>
		<int:object-to-json-transformer />
	</int:chain>
</beans>
