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

	<rabbit:admin connection-factory="connectionFactory" />

	<rabbit:queue name="si.ob.gw.integration" auto-delete="true" />

	<rabbit:direct-exchange name="si.ob.gw.integration.ex" auto-delete="true">
		<rabbit:bindings>
			<rabbit:binding queue="si.ob.gw.integration" key="si.ob.gw.integration"/>
		</rabbit:bindings>
	</rabbit:direct-exchange>

	<channel id="toRabbit"/>

	<channel id="fromRabbit">
		<queue/>
	</channel>

	<amqp:outbound-gateway request-channel="toRabbit"
		reply-channel="fromRabbit"
		exchange-name="si.ob.gw.integration.ex"
		routing-key="si.ob.gw.integration"
		amqp-template="amqpTemplate"/>

	<amqp:inbound-gateway request-channel="amqpIn"
		connection-factory="connectionFactory"
		queue-names="si.ob.gw.integration"/>

	<transformer input-channel="amqpIn" expression="payload.toUpperCase()"/>

	<rabbit:template id="amqpTemplate" connection-factory="connectionFactory"/>

	<rabbit:connection-factory id="connectionFactory" host="localhost" />

</beans:beans>
