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

	<bean id="redisConnectionFactory" class="org.springframework.integration.redis.RedisContainerTest"
		  factory-method="connectionFactory"/>

	<int:channel id="sendChannel"/>

	<int:channel id="outputChannel">
		<int:queue/>
	</int:channel>

	<int:channel id="requestChannel"/>

	<bean id="redisQueue" class="java.util.UUID" factory-method="randomUUID"/>

	<int-redis:queue-outbound-gateway id="outboundGateway"
									  request-channel="sendChannel"
									  queue="#{redisQueue.toString()}"
									  reply-timeout="10000"
									  reply-channel="outputChannel"/>

	<int-redis:queue-inbound-gateway id="inboundGateway"
									 queue="#{redisQueue.toString()}"
									 request-channel="requestChannel"/>

	<int:service-activator input-channel="requestChannel" expression="payload + 1"/>

</beans>
