<?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-redis:outbound-channel-adapter id="outboundAdapter"
										channel="sendChannel"
										topic-expression="headers['topic'] ?: 'foo'"
										message-converter="testConverter"
										serializer="serializer">
		<int-redis:request-handler-advice-chain>
			<int:retry-advice/>
		</int-redis:request-handler-advice-chain>
	</int-redis:outbound-channel-adapter>

	<int-redis:inbound-channel-adapter id="fooInbound" channel="receiveChannel" topics="foo" auto-startup="false"/>

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

	<int-redis:inbound-channel-adapter id="barInbound" channel="barChannel" topics="bar" auto-startup="false"/>

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

	<bean id="testConverter"
		  class="org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests$TestMessageConverter"/>

	<int:chain input-channel="redisOutboundChain">
		<int-redis:outbound-channel-adapter topic="foo"/>
	</int:chain>

	<bean id="serializer" class="org.springframework.data.redis.serializer.StringRedisSerializer"/>

</beans>
