<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration"
			 xmlns:beans="http://www.springframework.org/schema/beans"
			 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			 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">

	<beans:bean id="advice" class="org.springframework.integration.handler.advice.IdempotentReceiverTests$FooAdvice"/>

	<beans:bean id="store" class="org.springframework.integration.metadata.SimpleMetadataStore"/>

	<beans:bean id="store2" class="org.springframework.integration.metadata.SimpleMetadataStore"/>

	<idempotent-receiver id="idempotentReceiverInterceptor"
						 endpoint="my*, output"
						 metadata-store="store"
						 key-expression="payload"
						 throw-exception-on-rejection="true"/>

	<idempotent-receiver id="idempotentReceiverInterceptor2"
						 endpoint="myService2"
						 metadata-store="store2"
						 key-expression="payload.toUpperCase()"/>

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

	<service-activator id="myService" input-channel="input" output-channel="output" expression="payload">
		<request-handler-advice-chain>
			<ref bean="advice"/>
		</request-handler-advice-chain>
	</service-activator>

	<service-activator id="myService2" input-channel="input2" output-channel="output" expression="payload"/>

</beans:beans>
