<?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"
			 xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
			 xmlns:util="http://www.springframework.org/schema/util" xmlns:xmpp="http://www.springframework.org/schema/integration/xmpp"
			 xmlns:tool="http://www.springframework.org/schema/tool" xmlns:lang="http://www.springframework.org/schema/lang"
			 xsi:schemaLocation="http://www.springframework.org/schema/integration/xmpp https://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd
						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/context https://www.springframework.org/schema/context/spring-context.xsd
						http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
						http://www.springframework.org/schema/tool https://www.springframework.org/schema/tool/spring-tool.xsd
						http://www.springframework.org/schema/lang https://www.springframework.org/schema/lang/spring-lang.xsd">

	<context:property-placeholder location="classpath:test.properties"/>

	<beans:bean id="xmppProducer"
                class="org.springframework.integration.xmpp.ignore.XmppMessageProducer"
                p:recipient="${user.2.login}"/>

    <xmpp:xmpp-connection id="testConnection"
            user="${user.1.login}"
            password="${user.1.password}"
            host="${user.1.host}"
            service-name="${user.1.service}"/>

	<inbound-channel-adapter ref="xmppProducer" channel="outboundChatChannel">
		<poller fixed-rate="1000"/>
	</inbound-channel-adapter>

	<channel id="outboundChatChannel"/>

	<xmpp:outbound-channel-adapter channel="outboundChatChannel" xmpp-connection="testConnection"/>

</beans:beans>
